Earlier quoted context omitted.
if you're going to serve static files, nginx absolutely leaves this in the dust (think 50k rps on a beefy machine)
I would expect so, but did you mean 500k or something? "50k rps on a beefy machine" sounds like about the same as, or maybe even a bit slower than, 20k–30k on this 2011 laptop, which was how fast httpdito was last time I measured it.
Old box, dumb code, few thousand connections, no big deal
81–90 of 288 posts
Re: Old box, dumb code, few thousand connections, no big deal
#82Whether intended or not, there's an undercurrent of "you're all so dumb for using Python" (or Ruby, or PHP, or other similarly performant language) here. I want to surface that and question it a bit. It's totally reasonable for a company to choose the Python/Gunicorn option if they already have a bunch of people who know Python and they don't need to serve tons of requests per second. Even if they do need to serve to…
It seems like doubling down is the standard thing to do. Here's a video about how Instagram bugs engineers to do fewer string manipulations in Python instead of using a faster language https://youtu.be/hnpzNAPiC0E
Okay. Get over it.
Python is fine. Threads are fine. Go is fine. Clojure is fine. Java is fine. PHP is ... okay I won't go that far. :)
You fix the problem when the cost required to fix the problem is finally less than the opportunity cost of fixing something else.
Re: Old box, dumb code, few thousand connections, no big deal
#83should try this in erlang/elixir. i’m gonna bet you it could handle hundred of thousands of connections on a beefy machine (an million of connections w/ optimizations)
https://www.phoenixframework.org/blog/the-road-to-2-million-...
Re: Old box, dumb code, few thousand connections, no big deal
#84What WSGI do people recommend for python? I've been using gunicorn but this made me think of alternatives. Quick google search found this benchmark [0], is it really that bjoern is much quicker? It seems all other WSGI are ~ equivalent. [0] - https://www.appdynamics.com/blog/engineering/a-performance-a...
Re: Old box, dumb code, few thousand connections, no big deal
#85Earlier quoted context omitted.
When you hear "Engineer", you often think of calculus, statistics, formal testing, requirements gathering, documentation, repeatable results, etc... along with a fundamental understanding of the problem space and possible solutions. I think this is akin to NASA working on the Apollo program vs. someone in their garage attempting to build a go-cart for the first time. When you just slap things together and see if they…
>When you just slap things together and see if they work - are you really engineering? Why not? That's basically what testing is. Which was one of the attributes you attributed to "Engineer" >formal testing >I think we often cross "research and development" with "engineering" My general take: Scientists primarily focus on learning and proving new knowledge & ideas. (i.e. they research) Engineers focus in using proven…
We don't run test suites on our software to see what it does. We run test suites to validate it operates as it is supposed to.
I think the way you described testing is more in line with tinkering and research rather than engineering. It's experimentation, not testing.
When the outcome is unknown and unreliably unpredictable, it's research (tinkering). When it's predictable and has a known, repeatable outcome, it's engineering.
Re: Old box, dumb code, few thousand connections, no big deal
#86Earlier quoted context omitted.
I’ll bite, is it slack?
In all honesty, there's a whole slew of platforms it could be: - Slack - Keybase - Mattermost - Discord - Microsoft Teams - Facebook Messenger (incl. Work) All of these fine folks apparently use Electron or a similar technology...
Re: Old box, dumb code, few thousand connections, no big deal
#87Earlier quoted context omitted.
I would expect so, but did you mean 500k or something? "50k rps on a beefy machine" sounds like about the same as, or maybe even a bit slower than, 20k–30k on this 2011 laptop, which was how fast httpdito was last time I measured it.
went back and looked at it. a webserver written in asm for the lols is okay but my point was that you probably want a proven, battle ready web server (along the lines of nginx or apache) if running something in production. So, 50k rps on a vanilla well used/well maintened server > 50k rps on an experiment (and don't get this wrong, it's pretty impressive for what it is)
Re: Old box, dumb code, few thousand connections, no big deal
#88What WSGI do people recommend for python? I've been using gunicorn but this made me think of alternatives. Quick google search found this benchmark [0], is it really that bjoern is much quicker? It seems all other WSGI are ~ equivalent. [0] - https://www.appdynamics.com/blog/engineering/a-performance-a...
I'm using Waitress in production: https://docs.pylonsproject.org/projects/waitress/en/stable/ It's main thing is that it's really simple, worth a look if you're using Django.
Re: Old box, dumb code, few thousand connections, no big deal
#89IMO she's right, I wish we didn't mess wrap around gunicorn and gevent for some of our services. Certainly would've made my life easier and the services faster.
Re: Old box, dumb code, few thousand connections, no big deal
#90Rachel presumably wrote her server in a reasonable language like C++ (though I don't see a link to her source), but when I wrote httpdito⁰ ¹ ² I wrote it in assembly, and it can handle 2048 concurrent connections on similarly outdated hardware despite spawning an OS process per connection, more than one concurrent connection per byte of executable†. (It could handle more, but I had to set a limit somewhere.) It just…
Can you elaborate on what this means exactly? For example, is there some reasonable C code that runs 33 times slower than some other ideal code? In what sense are we wasting 97% of our computer's computational power?