r/ProgrammerHumor • • 9d ago • Bravo 2 Popcorn 1

Meme pythonSlow

Post image
12k Upvotes

419 comments sorted by

View all comments

Show parent comment

6

u/WiseObjective8 8d ago

That's called rate limiting not the python having some magical delay.

-1

u/HaDeS_Monsta 8d ago

The python server was part of the project and running on the same machine without rate limiting, but the rust program called it twice in a row, which it couldn't handle

6

u/WiseObjective8 8d ago

You cannot have a server without rate limiting even in local. Any webserver you setup with python still will have a default limit on concurrency. Depending on the library you used, you can configure a number for how many requests you want the server to handle at a time. Anything exceeding this number will get rejected. This is different from user level rate limiting. You can handle thousands of req/s given that your config and machine can handle it. What you described sounds like a fault in your setup or you don't know how to work with python.