Live data from Hacker News

My thoughts about Fly.io (so far) and other newish technology I'm getting into

blog.hartleybrody.com

21–30 of 111 posts

Re: My thoughts about Fly.io (so far) and other newish technology I'm getting into

#21
post #9

A little note about read replicas and problems I've discovered. It's often the case in code that you write a value to the DB then immediately read it back often in the form of a different query somewhere else. If you are setup to do some kind of a round robin read from the read replicas you can often get a different read from what you wrote as the value hasn't replicated to your read replicas yet. The solution is to…

This depends on the database and consistency level it’s enforcing. You can often configure databases to require an ack from the replicas before it returns, so that you’ll be able to read your writes. This obviously has a trade off with speed. Some databases are cleverer about this. Things like Spanner and FoundationDB work differently so as to be fast to both read and write, but they’re much more complex to operate a…

That's actually like what was done on the project in question. If you use a transaction it was set to always use the primary that way you can read and write all you want in your queries.

For this ACK that you talk about. It's AWS aurora mysql specifically here do you know if that's a setting you can setup?

Re: My thoughts about Fly.io (so far) and other newish technology I'm getting into

#22
post #3

An unrelated, yet honest question. There have been many posts hitting the HN frontpage regarding fly.io recently. Is it healthy to have so much content about a single PAAS platform showing up here so often now?

For better or worse, fly.io has as a principal tptacek, who's at the top of the HN leaderboard and so has built up a lot of goodwill here.

This actually makes me wonder if people here generally pay attention, who posted what? Does that influence actual upvote status?

I never look at the person name when replying or voting, only the content. For example, I remembered this tptacek not because I remembered his posts, but because they get frequently mentioned in other people posts.

Re: My thoughts about Fly.io (so far) and other newish technology I'm getting into

#23
Do many companies actually need databases geolocated near users?

I'm working on big and small projects/companies and that has never been any concern of ours.

I always imagined it to be something only the very very big players care about. And as a big player I would usually bet on a big partner like AWS, GCP, Azure. Or am I missing something?

Re: My thoughts about Fly.io (so far) and other newish technology I'm getting into

#24
post #3

An unrelated, yet honest question. There have been many posts hitting the HN frontpage regarding fly.io recently. Is it healthy to have so much content about a single PAAS platform showing up here so often now?

Fly isn't even that great, it's just everything else is much worse. I use it and I'm not surprised other people do as well.

There's also a lot of momentum for the Elixir/Phoenix right now, and they're pretty tightly integrated with that community.

Re: My thoughts about Fly.io (so far) and other newish technology I'm getting into

#25
post #20

The end of this article raises the issue of whether Fly.io’s USP, deploying app servers close to your users, is useful for run of the mill web apps. And as much as I like Fly.io and the people associated with it, I’ve wondered this myself. It just seems like serving to US customers from any major US data center is generally fast enough. And I think this might even be true for the world of HTML-over-the-wire web stuff…

Not only that, having one location for a world-wide user base is usually enough. You can optimize much more through rendering speed, blocking requests etc than by being closer to your user.

And even if your page becomes really popular, 3 locations (Europe, US, East Asia) are enough to be <200ms to any user in the world. And it keeps your setup and cost much lower.

Re: My thoughts about Fly.io (so far) and other newish technology I'm getting into

#26

Do many companies actually need databases geolocated near users? I'm working on big and small projects/companies and that has never been any concern of ours. I always imagined it to be something only the very very big players care about. And as a big player I would usually bet on a big partner like AWS, GCP, Azure. Or am I missing something?

Web Scale was first a meme, than an ideal everyone pushes towards even when deploying their small scale blog. Who knows what'll happen if suddenly you get a million concurrent users tomorrow? Better scale it geographically and put it behind a CDN today. Look at those generous free tiers.

Like you said, it's mostly snake oil except for very big players.

Re: My thoughts about Fly.io (so far) and other newish technology I'm getting into

#27
post #3

An unrelated, yet honest question. There have been many posts hitting the HN frontpage regarding fly.io recently. Is it healthy to have so much content about a single PAAS platform showing up here so often now?

As per dang's comment a few days back(1) > I wish more startups would achieve this, YC or not. Whenever I run across one that's trying to succeed on HN, I try to help them do so (YC or not)—why? because it makes HN better if the community finds things it loves here. Among the startups of today, I can think of only two offhand who are showing signs of maybe reaching darling status—fly.io (YC), and Tailscale (not YC).…

fly.io didn't do phoenix. They hired its creator Chris McCord, but Phoenix was already an established product.

Re: My thoughts about Fly.io (so far) and other newish technology I'm getting into

#29

Earlier quoted context omitted.

This depends on the database and consistency level it’s enforcing. You can often configure databases to require an ack from the replicas before it returns, so that you’ll be able to read your writes. This obviously has a trade off with speed. Some databases are cleverer about this. Things like Spanner and FoundationDB work differently so as to be fast to both read and write, but they’re much more complex to operate a…

That's actually like what was done on the project in question. If you use a transaction it was set to always use the primary that way you can read and write all you want in your queries. For this ACK that you talk about. It's AWS aurora mysql specifically here do you know if that's a setting you can setup?

Sorry no idea about AWS Aurora, but I think MySQL will do this itself.

Re: My thoughts about Fly.io (so far) and other newish technology I'm getting into

#30
post #17

Earlier quoted context omitted.

This depends on the database and consistency level it’s enforcing. You can often configure databases to require an ack from the replicas before it returns, so that you’ll be able to read your writes. This obviously has a trade off with speed. Some databases are cleverer about this. Things like Spanner and FoundationDB work differently so as to be fast to both read and write, but they’re much more complex to operate a…

I think that's an interesting idea. Here's a post that benchmarked multi-region Postgres (Elixir/Phoenix on fly.io): https://nathanwillson.com/blog/posts/2021-09-25-fly-multi-db... According to the post, for some users (residing in Japan, and the primary instance being located in Amsterdam), a query could take ~200ms (median). If multiple queries are performed for each request, that could mean 1 second or more per AP…

Yeah 200ms to the database feels essentially useless for a webapp. I'd normally expect This time all adds up. For a moderately complex webapp something like 10-20 queries isn't unheard of (even when you're careful about N+1 queries and caching). If each of those is taking ~5-10ms, add the network latency, and you're at ~50-150ms, which is pretty much your time budget for most end-user-facing webapps.

This is one of the problems with compute at the edge, you have to be much smarter about these things because there are a lot more network roundtrips between your app and database than there are between your customer and your app. Edge replicas help but still complicate things.

Post reply on HN