11 ms·
How Fly.io and Tailscale Saved Notado
- ilrwbwrkhv 4y ago3000 users? You can save the data on disk and not worry about it. Get a vultr 5 dollar micro instance. I don't know why all these engineer driven businesses focus on the wrong things. You don't need fly.io. Of course they will tell you you need them, I don't blame them. But fly.io or kubernetes should always be done by a migration team which you can hire once you have insane profits. Yes profits, the other tiny detail most businesses are missing these days.
- mrkurt 4y agoI won't tell you you need Fly.io. I am offended you'd put us in the same bucket as kubernetes though, rude.
- jabo 4y agoIt's interesting to see how being in the same league as kubernetes could either be considered a compliment or an insult depending on who you ask!
- GiorgioG 4y agoK8s is a complexity sinkhole for 99% of companies. It's an insult.
- alfalfasprout 4y agoIt's funny how we spend SO much time dealing with K8s related nuances and limitations. In practice, I'm not so sure anymore even for a large enterprise that K8s actually simplifies things in any way or adds more robustness.
- mountainriver 4y agoUh huh here we go. What other tool do you propose for running many containers with dependencies on one another? Or why should I target a bunch of different cloud APIs to make my tool consumable when I can target one?
- capableweb 4y agoFirst question: why you need many containers for just 3000 users? That should easily run on a cheap VPS unless you're doing something ridiculously complex. Why target any cloud APIs at all if your product have a small amount of users? You don't need to scale up/down fast at if you're just at 3000 users. Throw it on a Linux box, write a systemd service and be done with it.
- mountainriver 4y agoI'm not talking about 3k users, he said 99% of use cases
- capableweb 4y ago> 99% of companies Most companies have small amount of users and don't have rapidly shrinking/growing user bases, meaning their infrastructure need is not rapidly shrinking/growing neither, in most cases. Hence, Kubernetes being accidental complexity most people can do without, rather than necessary complexity.
- mountainriver 4y agoEh I don't have the numbers, but every company I've worked for has had lots of users. Their infra wasn't shrinking or growing much to make good use of k8s. Mainly they needed to link a bunch of runtime containers together built by different teams. I get why people say k8s is complex, but there really isn't another great option for running a containerized service based architecture, maybe nomad
- httgp 4y ago
- ipaddr 4y agoYou've inspired me to give it a chance.
- ilrwbwrkhv 4y agoFair enough. You guys are definitely a breath of fresh air compared to kubernetes. And we already use you guys although Cloudflare is pitching us their Workers pretty heavily.
- joshxyz 4y agoHaha, damn we need better one-liner analogies on these to easily discern the both in the future. If k8s is ____, fly is ____. I cant even compare fly to heroku, almost the same but different underneath.
- jahsome 4y ago
- bsnnkv 4y ago> You can save the data on disk and not worry about it. I one day aspire to have the cajones of ilrwbwrkhv. For the reference of other potential solo devs, if done right, Fly.io will still be cheaper than the Vultr 5 dollar micro instance (or equivalent) with an incomparably better DX.
- ipaddr 4y agoWith the threat of a much higher bill if done wrong. That $2.50 vultr instance provides a lot more like 20 gigs of storage nevermind security of a fixed bill. You might be able to save a little, you might pay a lot more. Hedge your bet and use vultr.
- bsnnkv 4y agoI generally agree, though I would add that I think this depends a lot on the skill set and technical background of the person. My gut feeling is that if someone is going to struggle with optimizing for a relatively fixed target like Fly (the billing is extremely predictable compared to some other offerings out there, if not completely fixed), the chances are that they won't be cut out to do double time taking on what is effectively a Linux sysadmin role.[1] [1] I may be completely wrong
- deznu 4y agoOr just have billing alerts...
- pclmulqdq 4y agoBilling alerts can tell you exactly when you have spent 4 figures after the fact. Using a VPS prevents 4-figure bills. Actual billing caps are very hard for cloud providers to implement with the HA distributed systems clouds use for billing, and would carry a significant performance cost. Alerts are the best you can do if you take the variable costs.
- deznu 4y ago
- deleted 4y ago[deleted]
- wooque 4y ago
- bsnnkv 4y agoI am happy to engage in discussion with critical comments made in good faith. This comment however, with its unnecessary ad-hominem attacks, seems particularly mean-spirited. For this reason, I have flagged your comment.
- dimgl 4y ago110% this. For a small business with a small amount of users, I always suggest to *use the simplest thing that'll save you the most time and money to deploy your service*.
- judge2020 4y agoEven if it would be best for the company, "managing VMs" is less impressive on a resume than "set up auto-scaling and server IAM utilizing fly.io and Tailscale".
- mbreese 4y agoI’m not sure resume-driven development is a trend we should embrace. (Even if we all acknowledge that it is one motivation for many tech fads). Honestly, if this is on a resume the next question should be — tell me why you needed such a system…
- nisegami 4y agoThat's why I advocate for MDD instead, short for Magpie Driven Development. Just as Magpies like their shiny trinkets, I like my shiny frameworks.
- jsyolo 4y agoYou can save the data on disk and not worry about it. Like in sqlite or something like json files?
- pclmulqdq 4y agoFilesystems have a lot more flexibility than just storing JSON or databases. A notes app probably should just store markdown files with some links between each other, and a few small databases for indexes.
- sgtnoodle 4y agoYou could also store base64 encoded blobs in yaml, or implement a self-modifying bash script key-value store you call into from a shell. Those are the only other options before it's time to move everything over to into the cloud.
- Dowwie 4y agoIn re: "Tokio, Messaging Queues and Async Rust", the Rust community may one day have a robust, fault-tolerant data ingestion and data processing pipeline like Elixir's Broadway, but today it remains a customized, heavy lift (depending on developer expertise). It would be great to have, in Rust, though.
- ricardobeat 4y agoSo what's the final cost of fly.io + proxy VM + postgres? That was the reason this whole thing started.
- bmorton 4y ago
- bsnnkv 4y agoIt's a really great product!
- theonething 4y agoWe tested it and experienced intermittent deploy failures so we didn't go with it.
- dgentry 4y agoFor me it was trying to build an AWS Lambda function where I'd deploy a new version and visit the URL, then wait for the CloudWatch logs. And wait. And wait. It might only be two minutes but that is long enough for me to want some tea, maybe look at some other issue filed that morning and see if I can make progress in diagnosing it, and WHOOPS I GOT DISTRACTED FOR HALF AN HOUR. fly.io is instantaneous. I deploy, I see the result, I fix it, I deploy again and figure out the next problem. It is a pleasant environment to develop in.
- akira2501 4y agoI've noticed the time for new logs to appear is proportionally related to the number of log streams you have in that container already. If you eagerly spool your logs out of there and keep a short threshold for automatic deletion the request to log delay for a lambda serving something like API Gateway is, in my experience, only a few milliseconds.
- ignoramous 4y ago> fly.io is instantaneous. I deploy, I see the result, I fix it, I deploy again and figure out the next problem. Clearly, you haven't hit those spontaneous fly.io bugs, yet ;)
- dang 4y agoNobody's sponsoring anything or "folding" anything on HN. We only care what users find interesting. The interest in fly.io, and the few other startups people get excited about, is definitely organic. I wish there were more of them—it would be good for the community and therefore for the forum.
- bsnnkv 4y agoIt's always an interesting time reaching the front page of HN. As might be expected, Notado saw a huge surge in registrations, saved content and large batches of comment imports today; I'm happy to report that this "hug of death" was handled without breaking a sweat. Thanks to all of you who provided your feedback, thoughts and engaged in good-spirited critical discussion with me here today. I don't take your time or your words for granted. Unfortunately I'm starting to reach that "had enough internet for today" point[1] so I'm going to be signing off now. I have already received a number of emails from people interested in specific parts of the Notado stack and how things work. If you would like to email me to ask about something specific, I'd be very happy to receive a mail from you: hello at notado dot app. I hope I can respond to your messages either bilaterally where possible or in further technical articles where appropriate. De khuday p'aman! [1] https://news.ycombinator.com/item?id=33240534 https://news.ycombinator.com/item?id=33240534
- solarkraft 4y agoMentally 6$ is a lot for a bookmarking service to me at first, but I can imagine getting a lot of value out of it. > Users will always have access to all of their previously saved content regardless of subscription status. > There will always be a quick and easy way to export all of your content I like the respect you're showing your users. I would feel more at ease using a service that I know I could host myself, but this is probably the next best thing.
- anderspitman 4y agoFly.io and Tailscale are two of my favorite companies. I think the future of selfhosting is Linux services running in microVMs on Windows and Android devices that people already have lying around. Fly.io is proving that the VM side is feasible. You also need something like Tailscale to tunnel through CGNAT et al. I work on open source projects that solve many of the same problems, but it's a chicken/egg problem, and Fly.io and Tailscale are building the infrastructure that will show people what's possible.
- queezey 4y agoFYI: Your link for Overmind is to the wrong project. The process manager is https://github.com/DarthSim/overmind https://github.com/DarthSim/overmind The article currently links to a deprecated Angular.js project with the same name (https://github.com/geddski/overmind https://github.com/geddski/overmind)
- bsnnkv 4y agoThanks for taking the time to point this out, I really appreciate small acts of kindness like this.
- jalino23 4y agoI fell in love with tailscale as soon as I figured out what it enabled me to do. it was very confusing at first cause I relate "vpn" to something like nordvpn or express vpn when I hear it. but no tailscale is a lot more than that.
- crawshaw 4y agothanks! we have a lot of work to do explaining tailscale. we’re working on it.
- CharlesW 4y ago“Make any device anywhere part of your own private, secure network.”
- coconut08 4y ago"what's a network, how is it different from the internet, and why do i need to add a device to it?" many people don't understand the implications of vpn'ing into their home devices. being able to access their network shares "over the internet" in a safe way. being able to access all of their random self hosted stuff without needing to be at home without needing a reverse proxy. all the while being easier to secure and safer than internet facing alternatives. these are things that people will actually understand that aren't just arbitrary abstract ideas.
- tptacek 4y agoThe challenge is that there's two kinds of VPN users (corporate and retail), and for corporate users, the thing you just described is simply a VPN.
- atonse 4y agoWe're a corporate user but to me it was "wireguard + SSO" and I was sold. The Okta groups sync is a beautiful cherry on top.
- deleted 4y ago[deleted]
- awestroke 4y agoHow is the latency and performance of Fly.io micro vms compared to, say, a comparably priced DigitalOcean VPS?
- bsnnkv 4y agoIn the specific case of Notado, the Tailscale tunnel between Fly and Digital Ocean for database access naturally introduces some minimal additional latency. Besides this, I'm not sure I'm in the best position to compare the latency and performance of a service running 100% on a Digital Ocean VPS vs. a Fly.io micro VM. Hopefully someone else can chime in with their experiences on this thread.
- Gcplp 4y agoI think that fly.io is still using firecracker for their microvm offering, although qemu has a similar machine type implemented. Having worked on firecracker and with firecracker, it does a good job in the networking area. Note that there's no multiqueue implementation available, so depending on how many connections and data you're passing through, it may start struggling if the workload is high. I don't know the specifics of how DO sets up their VMs, but I assume that they're not doing any fancy networking optimizations, so you may end up with similar issues on both setups.
- throwthere 4y agoI love Fly.io and use it in production, but unless I'm missing something the author would have been better off just running their kubernetes cluster locally on a $6 VPS on digital ocean. That would also obviate the need for the procfile hack and tailscale.
- DeathArrow 4y agoIf you can host your app on a $6 VPS, using a Kubernetes cluster seems like adding a little bit of overhead for no gains.
- radicaldreamer 4y agoA lot of super sophisticated engineering goes into solving problems which were created by the engineers themselves and obviously didn't need to be. I remember hearing that Oscar (a health insurance startup whose main differentiation was having a decent app) ran their own mesos cluster for some reason creating tons of cost and complexity with little to no reason (also operated tons of microservices with startup headcount).
- riwsky 4y agoContext (I work at Oscar): Oscar (no longer a startup; IPO'd last year) ran their own mesos cluster for the same reasons anyone uses k8s today: to help teams deliver in parallel. "Startup headcount" can mean different things to different people, but the company employs hundreds of software engineers, and has been around for over a decade. Kubernetes was not an option when they hit those scaling constraints—but now that k8s has established itself so firmly, Oscar's moving to a managed k8s setup. My experience before Oscar was mainly in a Spring monolith—which, yes, made some microservice overreaches pretty clear in my team's corner of the codebase—but even so, it'd be madness to coordinate all the org's development through e.g. a Jenkins instance and a bunch of ansible.
- dalyons 4y agoAgreed - 100s of engineers is an absolutely reasonable level at which to invest in k8s (or a precursor). At that size I would be very concerned if you weren’t, it would be hindering delivery in a modern software org. It really annoys me on HN how people can be so judgmental about something they know so little about.
- whimsicalism 4y ago3000 users sounds like too few to justify k8s
- bsnnkv 4y agoDefinitely. And just think, Notado started off on k8s without any users at all! As the article hints at, the choice mainly came down to laziness and complacency, at the cost of significant added complexity that would be paid by "future me" ("past me" is not always the most considerate...) I hope that one thing that potential solo devs take away from this post is that you can get very far without even needing to think about touching k8s (especially if you are already very comfortable with k8s). After all, HN and Pinboard comfortably serve many more users than our side projects likely ever will without bringing in any kind of heavyweight container orchestration platforms.
- renewiltord 4y agoI will migrate my tiny RDS and Cloud SQL side things to Fly.io a couple of weekends from now. It is definitely the sensible way for me to do this. I managed my own SQL DB once upon a time and I can tell you I would rather have it done for me. 10 years on from when I set it up, my provider was going to get rid of the hardware and couldn't VM migrate me, so I took it down. No urge to manage this stuff myself.
- RamblingCTO 4y agoI'm curious as to why you chose to build your services in rust and then one microservice is in golang?
- bsnnkv 4y agoThanks for this question! Back in early 2020, Meilisearch did not have a Rust client library, but it did have a Go client library[1], and there was nothing comparable to lib/pq[1] in the Rust ecosystem which would allow me to create a listener on a table.[3] Go is generally my "fallback language" when something would not be practical to do in Rust; it has a very nice, mature ecosystem, and as long as you aren't condemning yourself to interface{} hell, it remains in my eyes a perfectly capable and reasonably ergonomic alternative for well-defined use cases. [1] https://github.com/meilisearch/meilisearch-go https://github.com/meilisearch/meilisearch-go [2] https://github.com/lib/pq https://github.com/lib/pq [3] https://pkg.go.dev/github.com/lib/pq#NewListener https://pkg.go.dev/github.com/lib/pq#NewListener
- RamblingCTO 4y agoThank you for taking the time to answer, I'm always curious as to the why ;) Sounds like a good decision in that case! Good luck with your project!
- bsnnkv 4y agoJust wanted to share with you that I recently published another article on this component.[1] [1]: https://notado.substack.com/p/how-notado-syncs-data-from-postgresql https://notado.substack.com/p/how-notado-syncs-data-from-pos...