News for hackers. Stuff that matters.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by linsomniac on Monday July 31, 2023 @08:35PM (#36950840)
Ok, I'll bite... What kind of machine do you host this on that can handle 400,000 of these requests (with TLS mind you) per second? That was the load he mentions it handling in 2021, he stopped mentioning requests per day metrics after that.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by BeefWellington on Monday July 31, 2023 @08:58PM (#36951006)
400,000 req/s is actually not crazy. Back in the single-core era I was doing 1/10th of that on a production server for similar workloads a compiled VB / COM+ app. I would wager Nginx can handle that pretty easily on a modern dual or quad-core system.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by metadat on Monday July 31, 2023 @09:29PM (#36951213)
The thing is, at that rate, you'll likely run out of ports without more advanced / exotic TCP configurations.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by toast0 on Monday July 31, 2023 @10:16PM (#36951546)
Tcp connections are a 4-tuple {PeerAIP, PeerBIP, PeerAPort, PeerBPort}, if you hold your IP and port fixed, because you only listen on port 443, you can do 64k connections to each other peer's IP... if the other peer can manage to use them all.

Chances are you'll never run into that limit for this service, because even if there's a ton of users behind the same IP due to NAT, they don't need to hold long sessions, and you can disable http keep-alive and close connections right away. Chances are you'll have some ip diversity in 400k requests/second though.

Re:Icanhazip: A simple IP address tool survived a deluge of ... by hamandcheese on Monday July 31, 2023 @09:09PM (#36951079)
I think you are misunderstanding... the point of self hosting is that you only need to handle your own load. It only needs to scale to what, 1 request per day?
Re:Icanhazip: A simple IP address tool survived a deluge of ... by noirscape on Tuesday August 01, 2023 @03:20AM (#36953310)
Wasn't the original target of nginx back in the nineties to hit 100k requests per second with less overhead than (at the time, standard) apache2?

With that in mind + the general advancing of hw since then, it wouldn't be too suprising if nginx could handle that load easily. It'd just get more difficult if you wanted to put anything else (ie. metrics) on that endpoint since afaict nginx doesn't have anything to monitor those things if you don't have the Enterprise version of their tools.

In any case you might be misreading the setup for the parent here - the recommendation is just that if you're doing this in the context of a webapp, that this sort of behavior is trivially easy to bounce back in JSON using nginx.

Re:Icanhazip: A simple IP address tool survived a deluge of ... by zie on Tuesday August 01, 2023 @09:53AM (#36955972)
No, the point is, you host it for your own needs, so you are not using their service. Your implementation is for YOUR needs. You can make it public or not and advertise it or not at your discretion. What we do is make it public, but don't advertise it at all. Our software just uses it when needed.

If your use case calls for 400k/reqs a second on what your IP is and you haven't yet figured out how to build out your infrastructure(or pay someone to do it for you), you have bigger problems than figuring our what your public IP is.