Menu

Symfony 8.2 Messenger: When to Use Concurrency Instead of Multiple Workers
📰

Symfony 8.2 Messenger: When to Use Concurrency Instead of Multiple Workers

Long article (3021 words) — no AI summary yet.
Reading 0:00
15s threshold

Symfony 8.2 added --concurrency to messenger:consume . One process fetches from the transport and hands each message to a pool of child processes. The pull request's argument for it is one connection to the broker instead of N. The two earlier articles of this series covered what the pool does on its first message of every class and what it moves out of the handler process. This one answers the question that comes after reading them: should your Supervisor config say numprocs=4 , or --concurrency=4 , or both?

I ran five topologies through seven scenarios on Symfony 8.2.0 and measured what a tech lead has to trade: messages per second on short handlers, resident memory, connections to Redis, how long a cold restart takes to reach full speed, what happens to a latency-sensitive message behind a burst, how supervisorctl stop behaves with children in flight, and what a kill -9 of a process, a child or a parent does to the messages they were handling.

The single parent saves connections.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.