HNHacker News
TopNewBestAskShowJobs

adql

1,093 karma · joined November 7, 2022

submissionscomments
adql··on Scaling up the Prime Video audio/video monitoring service and reducing costs
The "different set of services" is so basic it can be ran anywhere, and near-everywhere is cheaper than AWS
adql··on CISC-y RISC-ness
It sounds very much like what current CPUs do, with x86 being mapped into execution units dynamically via microcode, except (I assume ? article was very low on detail) in case of Crusoe it just did it for big VLIV instruction blobs.
adql··on UK Blocks Microsoft’s $69B Activision Deal
A lot of people want to see it purely on hope that under MS Actiblizzard will be less shit of a company. Which is... optimistic.
adql··on Load Balancing
One perfectly homogenous server gets 20MB POST with image that then needs to be reencoded/cropped

Other gets tiny GET for CSS.

Boom, now your equal servers are inequally loaded. The beauty of leastconn is that if 1st server is loaded it will just naturally get less connections than the lucky ones that only got easy jobs

adql··on Load Balancing
Well, in short, yes.

> I always thought that for hundreds of backends and above 10K RPS those algorithms scale poorly

https://www.haproxy.com/blog/haproxy-forwards-over-2-million...

> First of all, scaling beyond single load balancer becomes a problem.

If you are in DC or have L3 access to the underlying network ECMP is VERY easy way to scale to 4-16 loadbalancers. Over that just... use multiple IPs. We use ECMPed setup of 4 nodes since forever and it works very well.

There are theoretical improvements that could be made by doing L4 loadabalancing into L7 loadbalancing, but you'd need a hell lot of traffic to ever need that

> The cost of updating counters becomes significant. If responses are quick, the cost additional bookkeeping adds doesn't pay off.

Essentially, yes but if you have some architecture that talks very little (say just few packets per connection, let's assume some IoT garbage), you probably just want different architecture altogether; like "first request gets you assigned server, then you talk to it directly without LB". L4 balancing is also an option.

In essence, if somehow performance of leastconn algorithm is your bottleneck, you're both big enough and specialized enough to go with another approach than "just dump all traffic at few loadbalancers"

adql··on Load Balancing
Start here:

https://github.com/haproxy/spoa-example

https://www.haproxy.com/blog/extending-haproxy-with-the-stre...

We used that to make an SSO login site that works independently on what is on the backend. Logic was basically:

* if there is no/invalid SSO cookie, SPOA set a flag which made haproxy redirect to the SSO app * if there is valid cookie, decode it and send the data (usually just logged user name) to the app in header

Once cookie is correct it doesn't need SSO server so it is pretty fast for users that already logged in.

It can be also used for blocking requests based on external engine, it's pretty flexible overall

https://docs.fastly.com/signalsciences/install-guides/other-...

adql··on Load Balancing
It kinda fell out of favour when even midrange server can do tens of gigabits of TLS traffic. So you need to be very big traffic wise to make it worth.
adql··on Load Balancing
...that's just push model. "Signalling" via "well, the loadbalancer have 10 sessions max per server" is enough.

Pull model just adds unnecesary RTT.

> Off the top of my head I'm trying to think how a host could actively signal to an LB that's its ready for more requests... I suppose its trivial and common to use a health check. Is it even a change to say that these need to be updated to achieve your goal of host to LB pulling?

Like this.

There is rarely a case where you decide to not serve the next request after serving previous one so push is most optimal for short ones. And if it doesn't want to it can just signal that via healthcheck.

Pull makes more sense for latency-insensitive jobs like "take a task from queue, do it, and put the results back", as if you say make video encoding service that dynamically scales itself in the background and "just do one encode and exit" is commonplace.

adql··on Load Balancing
That's push model when per-server maxconn is full tho.

The biggest benefit from pull model is not having to update backend server list every time you add/remove one but outside of that it isn't really all that beneficial.

You also get added latency, unless each backend server is actively listening and connected but if it is, you're just wasting extra RTT to say "hey, there is a request in queue, do you want it?"

adql··on Load Balancing
You need health checks. If not for LB then for your own monitoring.
adql··on Load Balancing
"Wait, why this is dead for 4 weeks and not processing anything

> One of the nicest things about pull load balancing is that it completely replaces the need for a separate registration + health check system.

"Jeff, stop taking random advice off HN as gospel, that shit is stuck in GC for last week ,we told you we still need monitoring"

adql··on Load Balancing
> But there are some cases, such as when serving audio/video streams (looking at you, porn :) where the server will send its response straight to the user, not back through the load balancer. So, the load balancer doesn't know how busy the server is, unless that information is communicated separately, through some other channel.

Loadbalancer can still see it's an incoming connection as long as user is sending something (even if returning traffic goes directly) so at the very least it can keep number of connections same.

Of course one might stream 240p while other user streams 4k but for example in HAProxy there is an option to use external agent for health checks, that also have option to modify traffic weights and cut traffic to ones that are being swamped

adql··on Load Balancing
And the fact that you should tune for loadbalancer to queue and eventually drop, not your app server.

Then in case of leastconn there will be no dropped connections as long as total server capacity < incoming traffic.

adql··on Load Balancing
It's not difficult. loadbalancer knows how many requests are in-flight to server. The OP is plainly wrong.

That's why leastconn works in the first place. And leastconn is almost always one you want. It's almost magical. GC stall on one server ? That means it isn't processing, which means every new request will go to other servers.

One server processing 2x as fast as the other ? Well, it keeps its connection count low, so it gets more of them

adql··on Load Balancing
> All push load balancing algorithms try to somehow predict how busy downstreams are.

They KNOW how busy they are. They are the ones tracking and forwarding connections to them. That's why leastconn works in the first palce

But, for example HAProxy have option to directly back-feed weights via healthchecks from app, so there is an option for app to signal back-pressure in RR balancing

adql··on Load Balancing
Leastconn also have very nice characteristics, that if your app say gets into long GC it will near-immediately stop sending connections there

Also the "overrun" of dropped connections shouldn't really happen if

* incoming connections are < total capacity * loadbalancer have server limits set properly and doesn't send too many connections for app to stgart dropping * loadbalancer itself is one queuing (as it "knows" the next server that should get the connection)

So that part of the description is subtly wrong; you WANT to queue on loadbalancer, not on app servers.

The app server should have queue just long enough to feed all the threads but not enough to start dropping anything

adql··on Offline is just online with extreme latency
Yeah and riding 1000cc bike is just like driving the bicycle with Extreme Speed /s

> In the case of webRTC, I've seen so many projects do this where they’re like, “It‘s peer-to-peer! You just connect to the signaling server and then the things talks!” That’s not really peer-to-peer cause you've got a server. If you've already got a server...my advice is: don't mess around with peer-to-peer stuff, just use that server.

The prevalence of NAT really did a number on ability to have properly p2p communication. And, well, rampant insecurity of default user setups making most internet connection be at the very least behind "only allow outgoing traffic or traffic initiated by user" type of firewall.

Even if you make all that nice code with each user having it nice and secure private key and having to accept someone's public key to start communicating there is still problem with distribution and ascertaining that user is really who they are.

And even if they are, well, they can be compromised, so your local app also have to be very secure or else the potential malware can just go between your contacts and compromise everyone using the app.

Or, you can just use SaaS and don't worry about it, or at the very least not worry about more than one app having ability to compromise your system

adql··on Why do ships use “port” and “starboard” instead of “left” and “right?”
Your left hand doesn't turn into your right hand if you lie on the bed different way
adql··on Why do ships use “port” and “starboard” instead of “left” and “right?”
...you just expect random readers to know how lung looks on (i assume) MRI, from (I assume) top ?

I'd also assume it would be simple to spot just because the image is always took from the same direction so the narrow part points out to front/back of the patient

adql··on Yubico is merging with ACQ Bure and intends to go public
That site is fucking garbage, and there doesn't even see to be a dock on what it supports.

Like, programmable key is cool as an idea but I need smartcard support and a button on it to confirm transaction to replace YK usage...

adql··on Yubico is merging with ACQ Bure and intends to go public
This fucking article.

CF, WHICH IS THE FUCKING SOURCE OF THIS PROBLEM, complains about the problem

adql··on Yubico is merging with ACQ Bure and intends to go public
the background makes it badly readable on phones too
adql··on Yubico is merging with ACQ Bure and intends to go public
Not talking about company being more successful but better to the actual customers. Google isn't exactly a good example here

Also Microsoft went public almost 4 decades ago, apple went public over 4 decades ago, the landscape looked a bit different there.

adql··on Yubico is merging with ACQ Bure and intends to go public
Those look very much as an exception to the rule
adql··on Yubico is merging with ACQ Bure and intends to go public
I don't think it's irrational, it rarely improves the service
adql··on Show HN: Gut – An easy-to-use CLI for Git
> git reflog (git usage or git cmdlog)

It kinda needs separate command that shows you both reflog entries and commands that lead to it. Maybe merged with undo command so you could look at the history of operations, go back to that point, and get alert if you skip something already pushed upstream.

git rebase -i is essentially "undo" of sort but, uh, not a tool for faint hearts.

> git blame (git author)

I doubt people are confused by that

> I'd love a command pallet where you could search for basic behavior in plain text like "reset my branch to GitHub's copy" or "only rebase two commits" and have it find the magic incantation.

"git do" that just asks ChatGPT and pastes solution lmao.

adql··on Show HN: Gut – An easy-to-use CLI for Git
> Maybe it's just morning, or maybe I'm a luddite, or both, but my knee-jerk reaction to this was "why does anyone need this? Just learn git."

Knowing the git enough to not need crutches is opposite of luddite.

But yeah, for devs sure, just read git book 2 or 3 times and if you're competent developer you'd probably get it just fine, once you get the concepts it's perfectly logical.

Just that not everyone is a developer wanting to use git for dev things and those UIs have place for that. I kinda wish there was more on the graphics side, like you can tell git how to diff binary files or even encrypted files but good luck explaining that to the non-coder trying to use it.

I still don't get developers complaining about it, it's your fucking main tool to work and about 10x easier than competence in any programming language, just learn it, you will use it longer than any piece of code you ever wrote most likely.

adql··on Show HN: Gut – An easy-to-use CLI for Git
Git gud with git or get gut ?
adql··on The Twitter API is now effectively unmaintained
Also FSD in 2024 will work perfectly
adql··on The Twitter API is now effectively unmaintained
The 2020 was in negative, 2021 was also in negative. That's not "becoming profitable"
← PreviousPage 8 of 20Next →