News for hackers. Stuff that matters.
Re:You Don't Know Jack about Bandwidth by EvanAnderson on Wednesday October 09, 2024 @10:03PM (#41794795)
Latency is a cruel mistress. Had a Customer who was using an old Win32 app that did a ton of individual SELECT queries against the database server to render the UI. They tried to put it on the end of a VPN connection and it was excruciating. The old vendor kept trying to convince them to add bandwidth. Fortunately the Customer asked the question "Why does the app work fine across the 1.544Mbps T1 to our other office?" (The T1 had sub-5ms latency.)
Re:You Don't Know Jack about Bandwidth by akira2501 on Thursday October 10, 2024 @12:12AM (#41795426)
I test all my web dev on the other side of a 4G modem connected to an MVNO. It forces you to be considerate of both bandwidth and latency as it's about 5-20Mbps in the city with 120ms average latency.

It's not at all impossible to design fast and responsive sites and single page applications under these constraints, you just have to be aware of them, and actively target it during the full course of development.

Re:You Don't Know Jack about Bandwidth by slt2021 on Thursday October 10, 2024 @12:24AM (#41795486)
good for you, you are doing your job very well.

part of the reason why modern software is so crappy, is because developers often have thee most powerful machines (MacBook pro like) and don't even realize how resource hungry and crrappy their software at lower end devices

Re:You Don't Know Jack about Bandwidth by Escapado on Thursday October 10, 2024 @01:04AM (#41795701)
Another part of the reason is that in every company I have ever worked for some SEO dude insists we need to add literally 10 different tracking scripts and insists they need to load first and consume megabytes of data. At my last gig the landing page was 190kb of HTML, CSS and JS from us, 800kb of images and literally 8mb in vendor scripts we were mandated to load as early as possible. Of course we fought it, of course nobody cared.
Re:You Don't Know Jack about Bandwidth by justmarc on Thursday October 10, 2024 @01:43AM (#41795907)
Try an e-banking website which literally loads over 25MB of crap just to show the login page.

This is by far the worst offender I've seen.

Madness.

Re:You Don't Know Jack about Bandwidth by huijzer on Thursday October 10, 2024 @01:16AM (#41795754)
Yes MacBook pro with a glass fibre connection with a ping below 10 ms to the server.

I’m usually on an old copper line (16 ms ping to Amsterdam) in the Netherlands (130 ms to San Francisco).

Some sites are just consistently slow. Especially GitHub or cloud dashboards. My theory is that the round trip to the database slows things down.

Re:You Don't Know Jack about Bandwidth by FridgeSeal on Thursday October 10, 2024 @03:31AM (#41796462)
GitHub and everything Atlassian deserve to be thrown in the pit-of-shame and laughed at for perpetuity.

Jira is so agonisingly slow it’s a wonder anyone actually pays for it. Are the devs who work on it held against their will or something? It’s ludicrous.

GitHub gets worse every day, with the worst sin being their cutesy little homegrown loading bar, which is literally never faster than simple reloading the page.

Re:You Don't Know Jack about Bandwidth by oefrha on Thursday October 10, 2024 @04:49AM (#41796916)
These days people on HN love to advocate sockety frontend solutions like Phoenix LiveView, where every stateful interaction causes a roundtrip, including ones that don’t require any new data (or all required data can be sent in a batch at the beginning / milestones). It’s like they forgot the network exists and is uneven and think everything’s happening in-process.

To ward off potential criticism: I know you can mix client-side updates with server-side updates in LiveView and co. I’ve tried. Maintaining client-side changes on a managed DOM, sort of like maintaining a long-lived topic branch that diverges from master, sucks.

Re:You Don't Know Jack about Bandwidth by eru on Thursday October 10, 2024 @02:26AM (#41796113)
In the Google office we had (perhaps they still have) a deliberately crappy wifi you can connect to with your device, to experience extra latency and latency spikes and random low bandwidth. All in the same of this kind of testing.
Re:You Don't Know Jack about Bandwidth by martyvis on Thursday October 10, 2024 @06:16AM (#41797350)
Many years ago I was called into troubleshoot the rollout of a new web based customer management application that was replacing a terminal green screen one. I was flummoxed finding all the developers had only ever tested their app running from workstations on 100Mbps switches where the target offices for this application were connected by 128kbps ISDN lines. I was able demonstrate how each 12kB of their application was going to take 1 second. (It was amazing to see their HTML still full of comments, long variable names, etc). I don't even think they had discovered gzip compression. This was after many millions of dollars had already been spent on the development project.
Re:You Don't Know Jack about Bandwidth by chrismorgan on Wednesday October 09, 2024 @11:34PM (#41795252)
I was involved in some physical network inventory software a dozen years ago. One team produced some new web-based software for it, for use by field agents and such. The first version we got to review was rather bad in various important areas; my favourite was that search would take over thirty seconds in common real-world deployment environment: it was implemented in .NET stuff that makes server calls easy to do by accident and in unnecessarily blocking fashion, and searched by each of the 34 entity types individually, in sequence; and some .NET session thing meant that if the connection had been idle for ten minutes or something, it would even then need to retry every request that got queued while the session was “stale”, which was all of them. So you ended up with 68 sequential requests, on up to half a second’s latency (high-latency 3G or 2G or geostationary satellite)… so yeah, 30 seconds.

They’d only developed it with sub-millisecond latency to the server, so they never noticed this.

I don’t think it was a coincidence that the team was US-based: in Australia, we’re used to internet stuff having hundreds of milliseconds of latency, since so much of the internet is US-hosted, so I think Australians would be more likely to notice such issues early on. All those studies about people abandoning pages if they take more than two seconds to load… at those times, it was a rare page that has even started rendering that soon, because of request waterfalls and high latency. (These days, it’s somewhat more common to have CDNs fix the worst of the problem.)

Re:You Don't Know Jack about Bandwidth by dietr1ch on Thursday October 10, 2024 @08:45AM (#41798253)
I think that latency people grow up with has a huge impact on how careful they are when using the internet.

Having gotten my hands on an experimental 128kbps link early on, but later and moving to the countryside with a 56kb-1Mbps really spotty connection made me really appreciate local state as every time things blocked on the internet made it pretty notorious.

I'm glad there's a push for synchronized, local-first state now, as roaming around on mobile or with a laptop hopping on wifi can only perform nicely with local state.

Re:You Don't Know Jack about Bandwidth by EvanAnderson on Thursday October 10, 2024 @04:55PM (#41803503)
> I think that latency people grow up with has a huge impact on how careful they are when using the internet.

This reminds me a ton about the studies showing harm to children's future mental health as a result of growing up poor. I definitely "hoard" data locally because I grew up with accessing BBSs at 1200 baud, moving up thru dial-uo Internet, and eventually shitty DSL. Services and products that rely on constant access to the Internet strike me as dodgy and likely to fail as a result of my "upbringing".

Re:You Don't Know Jack about Bandwidth by Hikikomori on Thursday October 10, 2024 @04:20AM (#41796745)
Had some devs in another country complaining that their database query was taking hours to complete but doing it from a server in the same datacenter took a few minutes. Took some weeks of emails and a meeting or two until they understood that we couldn't do anything, I had to actually say that we couldn't do anything about latency unless they physically move their country closer to us.
Re:You Don't Know Jack about Bandwidth by jstanley on Thursday October 10, 2024 @04:29AM (#41796800)
Could you replicate the data to their country and let them run queries locally?

Could they run their client from your country and operate the UI remotely?

There are more options than moving the country!

Re:You Don't Know Jack about Bandwidth by Hikikomori on Thursday October 10, 2024 @06:02AM (#41797282)
I was the network engineer. It was their server and database, I couldn't solve the latency problem for them.
Re:You Don't Know Jack about Bandwidth by rodrigodlu on Thursday October 10, 2024 @05:14AM (#41797054)
It's easier to have an replica. Doesn't matter if it's "realtime" sync or using CDC, from backups, etc.

You can even ask one of these guys to do the setup for you. They'll do in a pinch with a happy face.

I know because I did.

Re:You Don't Know Jack about Bandwidth by Hikikomori on Thursday October 10, 2024 @06:03AM (#41797287)
It is, but not my problem as a network engineer. We did suggest that though but they refused to believe that we couldn't solve the latency "problem".
Re:You Don't Know Jack about Bandwidth by martyvis on Thursday October 10, 2024 @06:21AM (#41797382)
I have been there many times. While the network guy can solve some of the latency in things like TCP handshakes and use compression and caching with magic black boxes you can't fix the actual application query and acknowledgement requirements that might be there.
Re:You Don't Know Jack about Bandwidth by chickenbig on Thursday October 10, 2024 @04:43AM (#41796882)
> Latency is a cruel mistress.

Yes, Bloomberg had fun with latency because of their datacenter locations (about a decade ago they still only had two and a half close to New York). Pages that would paint acceptably in London would be unacceptable in Tokyo as when poorly designed they would require several round trips to render. Once the page rendered there was still the matter of updating the prices, which was handled by separately streaming data from servers close to the markets to the terminals. A very different architecture but rather difficult to test because of the significant terminal-side functionality.

Re:You Don't Know Jack about Bandwidth by mschuster91 on Thursday October 10, 2024 @05:34AM (#41797151)
> Fortunately the Customer asked the question "Why does the app work fine across the 1.544Mbps T1 to our other office?" (The T1 had sub-5ms latency.)

That reminds me on the atrocious performance of Apple's TimeMachine with small files. Running backups on SSDs is fast, but cable ethernet is noticeably worse, and even WiFi 6 is utterly disgraceful.

To my knowledge you can't even go and say "do not include any folder named vendor (PHP) or node_modules (JS)", because (at least on my machine) these stacks tend to be the worst offenders in creating hundreds of thousands of small files.

Re:You Don't Know Jack about Bandwidth by rahimnathwani on Thursday October 10, 2024 @11:57AM (#41800197)
Multiple requests sent in series (e.g. because each depends on the previous one) is also a problem with web apps. When you're developing locally or testing on a staging server near you, the latency is negligible and you might not notice.

Chrome's developer tools allow you to disable caching and choose to simulate a specific network type. Most people know those settings restrict the throughput. But they also increase the request latency. They do this on a request-by-request basis, not at packet level, so it's only an approximation. Still a good test.

Re:You Don't Know Jack about Bandwidth by therein on Thursday October 10, 2024 @03:04PM (#41802242)
Latency to the database especially a cruel mistress.