How i can solve this issue Concurrent requests to Worker leads to duplicate handling

Hi Everyone,

I have an interesting thing happening. I have a Worker, and that Worker receives multiple POST requests concurrently. For example, let’s say it received 100 requests in a given second. In this context, I consider an instance of a Worker to be the worker spun up to handle a request.

Here’s the weird thing. One instance of the Worker is handling multiple requests, rather than just its own request. So, 100 requests leads to 100 Workers spinning up to respond, but those 100 Workers fetch listeners are triggered 20-50 times each, so now you’ve got the function the Worker is responding with running 2000-5000 times total, rather than just 100 times for the 100 requests as I would expect.

I’ve found that a given worker is responding to multiple concurrent requests by collecting the request data for each Worker, logging it, and seeing that the POST requests collected are indeed duplicates it should not be getting.

Does anyone know why this might be?

Thanks!
Best Regards