9 ms·
Where's the fastest place to put my server? How much does it matter?
- krzrak 6y ago1 mb (1 milibit) HTML is not that "fat"...
- bdcravens 6y agoBy today’s standards, in a nation rich in high speed connections, perhaps.
- stjo 6y agoI think you missed the (a bit pedantic) joke about units
- bdcravens 6y agoOops, you're right.
- timbit42 6y ago1 MB = 1 megabyte 1 Mb = 1 megabit 1 mB = 1 millibyte 1 mb = 1 millibit
- sagolikasoppor 6y agoIn Europe a megabit is usually written mbit
- detaro 6y ago1 mB = 1 millibucket
- lxgr 6y agoMost providers these days round up to the next full bit, though. Some even charge by the byte!
- deleted 6y ago[deleted]
- superzamp 6y agoNice article. > Caches work great for CSS files, images and javascript - stuff that doesn't chance for each user. It doesn't work as well for the responses to API calls, for which the responses are different for each user, and sometimes, each time Regarding this, there seems to be some people addressing the issue now (I have fly.io in mind, and maybe Vercel but I believe the latter use lambdas behind the hood so probably less effective).
- NDizzle 6y agoThere's always Varnish.
- Nextgrid 6y agoUltimately there has to be a source of truth somewhere, and geographically scaling a DB is difficult (CAP theorem and all that). Running your code at the edge doesn't help much if it still has to talk to a database far away to actually produce a response.
- mrkurt 6y agoShameless plug: https://fly.io https://fly.io We built Fly _specifically_ so you can run servers close to your users. We do a lot for you on the network side, too, like terminate TLS in all our regions. One thing to note, though, is that latencies between cities are surprisingly different than their theoretical max. We have apps on Fly with lots of South American users. It's frequently faster for people in Argentina to connect to Miami than it is to hit Sao Paulo or Santiago. The same goes for Africa. And the "Asia Pacific" region is a monster. Most points of presence there are _thousands_ of miles away from each other. So we occasionally see people go from Tokyo -> LA instead of Tokyo -> Hong Kong/Singapore.
- toast0 6y ago> It's frequently faster for people in Argentina to connect to Miami than it is to hit Sao Paulo or Santiago. Yeah, most networks in South America don't interconnect with networks in other countries. They mostly connect in Miami, because international connectivity is difficult to arrange, and if you can only manage to connect to one other country, it needs to be the US. Africa likely goes to Europe rather than the US? But same thing, it's hard to connect, so first you have to connect to where the content is. And there's not (currently) enough network stability and capacity to just connect to your neighbors and rely on them to get you to the US/EU either. I don't know if it's current, but in Japan there used to be two dominant networks, but they weren't both available at the same PoP. You would need a Tokyo-A pop to get to one, and a Tokyo-B pop to get to the other; and it was difficult to interconnect those pops.
- subleq 6y agoThe applications I work on do several database calls for single user HTTP request. Shouldn't the application server be as close as possible to the database, rather than to the user? I struggle to think of an example where your model is useful, unless your application has no database.
- danielheath 6y agoAll the cacheable responses (including assets) benefit from being close to the user.
- airocker 6y agoCan you elaborate more about the server in Finland? How does it work? The ones I have seen are super expensive and the only thing they provide over putting server at home is the network quality. Any ideas where we can get a inexpensive data center that can on/off the system and give good network?
- macno 6y agoMy guess, the author uses hetzner
- calpaterson 6y agoYep.
- preinheimer 6y agoWe (not the author of the article) use this provider in Finland: https://creanova.org/ https://creanova.org/
- ignoramous 6y agoRight now, due to vast CDN footprints, PoPs would be the fastest place to run a "web server": S3+Cloudfront / Lambda at Edge, Cloudflare Workers, StackPath EdgeEngine etc Soon the fastest place is going to be the 5G Edge with products like vapor.io Kinetic Edge Colo, AWS Wavelength, Google Anthos for Telecommunications already making a push for it. Ex: https://cloud.google.com/blog/topics/anthos/anthos-for-telecom-puts-google-cloud-partners-apps-at-the-edge https://cloud.google.com/blog/topics/anthos/anthos-for-telec...
- bob1029 6y agoThe edge is getting to be really important for high quality interactions, but there are some caveats. In systems in which there is common shared state between all participants (e.g. Fortnite), you fundamentally must have a form of centralized authority somewhere. In these cases, you do not gain very much by pushing things to the edge if most interactions require taking a round trip through the business state machine. This realization is why I really enjoy the renewed push for server-side hosting technologies. Accept the fundamental physics constraints, bring all the state under 1 roof, and think differently about the footprint of a global-scale application. AWS solved this problem by making their regions more-or-less 100% standalone. The only major thing that really spans all regions is account/session management, but consider that there arent serious UX constraints around a login attempt taking more than 150ms.
- viraptor 6y ago> In systems in which there is common shared state between all participants (e.g. Fortnite), you fundamentally must have a form of centralized authority somewhere. I wonder if there's any big online game already which does match making preferring local servers. And I don't mean local as in "people registered in us-east region", but rather "there are 4 people ready to play in Chicago, spawn an instance there and connect them".
- bob1029 6y agoI am almost certain this already a metric used by matchmaking in certain FPS games like Overwatch.
- rsync 6y agoMany years ago (2006 and 2009, respectively) I had to choose European and Asian locations for rsync.net storage arrays. My primary, overriding criteria in choosing locations was what would be the coolest, most interesting place to visit for installs and maintenance. I chose Zurich and Hong Kong. Measured results have exceeded my initial models.
- Hallucinaut 6y agoThis is one of those comments that's difficult to interpret the meaning of... until you read the commenter's name. (Love your work)
- Johnny555 6y agoThe cloud ruined that fringe benefit, I used to manage servers in London and got to visit them quarterly. But now I manage servers all over the world, and it's impossible to see them physically, even the ones that are hosted nearby. Though all things considered, I don't really miss sitting inside a cold, loud datacenter or standing in front of a tiny KVM monitor for hours just to load CD's to do a software upgrade.
- rsync 6y ago"But now I manage servers all over the world, and it's impossible to see them physically, even the ones that are hosted nearby." Did you know that we have "drive up" access ? If your account is in San Diego, you can just drive up to the datacenter and connect to our Ubiquiti LR AP. No Internet required. We had it deployed in Denver as well but we moved datacenters a few years ago and are in a tall high rise[1] with difficult access to ground level or roof for antennae ... [1] The "Gas and Electric" building which is the big carrier hotel in Denver ...
- Arelius 6y agoAny capacity to plug in an good old-fashioned Ethernet cable?
- gruez 6y ago>Here's a table of latencies from London to other world cities with more than 5 million people, comparing against the theoretical maximum speed, the speed of light: This is a flawed comparison because it looks like he's comparing ping latency (round trip time) with speed of light (one trip), so the "Slowdown factor" columns is off by a factor of two.
- tyingq 6y agoThe table updated with that fix. https://jsfiddle.net/32e0qkxs/ https://jsfiddle.net/32e0qkxs/
- calpaterson 6y agoAuthor here, you are absolutely right and I will correct that!
- xiii1408 6y agoMinor note---you can get much tighter theoretical minimum latencies than the ones listed in your table. 1. The table's mins divide straight line distance by the speed of light. This gives you the time it takes for light to travel in a straight line from, say, London to New York. However, your "real latencies" are roundtrip ("ping") latencies. Thus, you need to multiply all the theoretical latencies by two. 2. Data does not travel through a fiber optic cable at the speed of light. This is because light actually bends around the cable when transmitted. These are called cosine losses, and mean the light travels roughly 5/3 the actual cable distance. So, multiply again by 5/3. (This is why HFT firms use microwave links for long distances.) If you multiply the theoretical maxes by 3.33, you'll see that they're very close to the actual latencies you're observing. New York -> London becomes 62.7 ms optimal, so you're only 13% slower than the theoretical max. Here on the west coast, I typically see within 10% of the theoretical min for data going over the Seattle -> Japan submarine cables.
- ksec 6y ago>so you're only 13% slower than the theoretical max. Yes. Not to mention those Fibre aren't exactly a straight line. There is extra distance for layering the fibre route. 13% is very close to practical maximum. That is why I asked [1] if we have Hollow Core Cable [2] soon where we get close to Real speed of light. [1] https://news.ycombinator.com/item?id=26026002 https://news.ycombinator.com/item?id=26026002 [2] https://www.laserfocusworld.com/fiber-optics/article/14170019/hollowcore-optical-fibers-may-have-a-bright-future https://www.laserfocusworld.com/fiber-optics/article/1417001...
- xiii1408 6y agoThat sounds awesome. I would love to see lower latencies. Do you know if anyone's considering these for consumer Internet?
- toast0 6y agoAssuming these cables cost more, or require equipment that costs more, I wouldn't expect this on last mile connections. ISPs simply don't care that much. DSL providers typically run connections with settings that add 15+ms of round trip. My DSL provider runs PPPoE for fiber connections where fiber is available, etc. When I was on AT&T fiber, it was still about 3-5 ms round trip to the first hop. It's been a while since I've experienced cable to know how they mess it up. If there's significant deployment of the cable in long distance networks, eventually that should trickle down to users. It would probably happen faster if there were competitive local networks, but regardless, a significant drop in latency across a country or ocean can be big enough to justify some expense.
- preinheimer 6y agoIf you're looking for more detailed ping data this is his source: https://wondernetwork.com/pings https://wondernetwork.com/pings (which didn't seem to be worth linking to)
- calpaterson 6y agoYes! I'm just going to add a link right this minute!
- antidocker 6y agoInteresting read. Did you measure your application latency? It's wrong to think that CA to London is slowest. It may if you view things physically but fast POPs make it fastest route sometimes.
- bullen 6y agoI make MMOs, and there are only two "large" cloud providers that have machines in central US: Google and IONOS.
- CppCoder 6y agoDoes anyone know or has experience in how a „Direct Connect“ line reduced the latency? Instead of having your users go through the public internet, they connect to some proxy which is closeby and sends the traffic through the „privat“ line.
- fouric 6y agoAs a not-currently-webdev, it seems to me like making a good website, on a technical level, is closer to an engineering trade-space (as opposed to "just do it better") than I had thought. Splitting static content into smaller files allows for better cache utilization, but increases page load times due to higher latency when those items aren't cached. Bundling content reduces roundtrip penalties (latency, various per-request processing overheads) at the cost of greater bandwidth usage. Wealthier users usually are latency-limited, as opposed to bandwidth-limited. Mobile users and poorer users in wealthier countries are usually limited on both. Users in poorer countries have it even worse. The only way that you can "win" appears to be by making your content as static and as simple as possible.
- cookie_monsta 6y ago> The only way that you can "win" appears to be by making your content as static and as simple as possible. Please.
- JoeAltmaier 6y agoNot Eugene OR. That's where my startup put their servers for a conference/collaboration tool. I remember getting a complaint from a customer in Jordan, trying to conference with a customer in India. They had something like 1sec latency, communicating through Eugene and back. Twice across the planet.
- Tepix 6y agoFor planet-wide real-time communications (i.e. voice) you really need several server locations or go p2p. Optimize for MOS ( https://en.wikipedia.org/wiki/Mean_opinion_score https://en.wikipedia.org/wiki/Mean_opinion_score ) and take into account how latency affects that score.
- joshxyz 6y agoInteresting problem really, for telegram bots I found Frankfurt Germany to be near their servers, which gives me almost instantaneous response. For trading platforms it's fun monitoring latencies on websocket heartbeats, sometimes i get lucky and discover some platform is really nearby (e.g. 1ms to 3ms) which is very nice. Still, nothing beats localhost as the fastest place on earth.
- jackjackk0 6y agoOn the related github repo: "If you just want to see what I did, best to read the makefile directly." Sometimes I'm amazed by the power of a good makefile that allows replicating a perhaps fairly complex set of inter-dependent targets. I wish this approach was used more in academic research, even though fitting data analysis and modelling within a standard makefile can get tricky (e.g. some passages going through remote cluster computing, some models involving large number of files that would need to be listed as dependencies)
- 0xbadcafebee 6y agoEdge computing?
- superkuh 6y agoThe fastest place to put your server is in your home. Compared to having things locally everything is slow. If you want a server for other people then it changes.
- dboreham 6y agoLike Bill and Hillary.
- Tepix 6y agoIf that's what you want to optimize for, take this idea and run with it. I.e. you can build a website that downloads some data into the browser while the visitor is viewing the first page and subsequent pages will be delivered from inside the browser without hitting the network. They may not be too happy about the extra traffic, especially when on mobile.
- peter_d_sherman 6y ago>"If you're wondering why small New Jersey towns like Secaucus and Piscataway are so well connected - they have big data centres used by America's financial sector." PDS: In other words, if you're looking for great connectivity points (in America or abroad) -- look for peering points already in use by the financial industry... It makes a lot of sense...
- acd 6y agoMost CDN providers set TCP/IP initial congestion window to boost performance. TCP/IP initial congestion window is how fast TCP/IP first sends the data to the client. TCP/IP has slow start algorithm normally that slowly starts sending data and then its goes faster and faster. I would say most CDN providers have tuned the TCP init congestion window Linux performance setting properly that speeds up the initial sending speed. One could compare CDN and HTTP server with setting TCP initial window or without. Linux command to change initcwnd ``sudo ip route change default via 192.168.1.1 dev eth0 proto static initcwnd 10``` For more information about initcwnd see: * https://blog.imaginea.com/look-at-tcp-initcwnd-cdns/ https://blog.imaginea.com/look-at-tcp-initcwnd-cdns/ * https://tma.ifip.org/2018/wp-content/uploads/sites/3/2018/06/tma2018_paper13.pdf https://tma.ifip.org/2018/wp-content/uploads/sites/3/2018/06... * https://www.cdnplanet.com/blog/tune-tcp-initcwnd-for-optimum-performance/ https://www.cdnplanet.com/blog/tune-tcp-initcwnd-for-optimum...