Replies: 1 comment
-
|
The problem relies on the fact almost every client out there use keep-alive connections. My advise for a single-threaded application, is to set |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @gi0baro,
we are moving our services from
wsgito Granian. We are also currently load testing our services to find out weaknesses and improvements.We do see a strange behavior happening and would like to get your input.
Our services are not thread-safe. Hence, we currently use the setup:
So 1 thread and
wsgias interface.Now, the issue we have is that during the load test a small percentage of requests will just timeout only when we set
BACKPRESSURE=1. If we remove that, we don't see it happening.I even created a small Docker setup for you to test.
CODE
app.py
Dockerfile:
To load test, we are using
k6with 500 VUs:RESULT
See the max duration: 1 minute. So in this simple test, there were few requests that took 1 minute to complete.
This seems like the connection was just hanging, or timed out.
HYPOTHESIS
Now, our current hypothesis is:
BACKPRESSURE=1: each worker accepts 1 connection at a timebackpressure=1, ~16 requests in total.When we remove
BACKPRESSURE=1, each worker can accept more connections, so the issue doesn't happen (as quickly, at least).But then, the question is: in a single-threaded wsgi application, does it make sense to set
BACKPRESSUREto something different than1? According to the documentation, it doesn't.Maybe we should set
BACKLOGto a bigger number then? So that we can accept more connections?What do you advise?
Beta Was this translation helpful? Give feedback.
All reactions