Skip to content
Discussion options

You must be logged in to vote

Yeah you are right, it will be 4 x 10 = 40 threads. Each thread has its own instance of the service. A worker is just a script that is executed by a configured amount of threads (calling frankenphp_handle_request). All threads run in a single process, even those of different worker scripts.

The reason you are seeing 1, 2, 3, 4, 5, 6 instead of 1, 1, 1, 2, 2, 2, 3, 3, 3 is that requests are dispatching to threads in order. So if thread 1 is busy, check thread 2, if thread 2 is busy, check thread 3 and so on. This helps workers be more efficient by primarily using the 'hot' threads and minimizes connections to external services.

It's also possible to start additional threads only once they …

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@Aielen
Comment options

@AlliBalliBaba
Comment options

Answer selected by Aielen
@Aielen
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants