"Handling 1M database updates triggered by a dashboard button. We decoupled PHP's synchronous timeout using RabbitMQ and a batch-processing Go worker. Plus: How to make it adaptive next time."

Async Processing for Dashboard Clicks: Batch Updates in Go

The Context

A legacy PHP application served as the backend for a marketing dashboard. Business users would select a large segment of customers and click a button (e.g., "Send Campaign" or "Mark as Processed").

The Original Flow: