About this question

TCP Connection Pool Burst Capacity Manager

Medium · networking · Quant Developer interview question · connection-pool, tcp, networking, capacity-planning, hft-gateway, concurrency

In high-frequency trading, order gateways use TCP connection pools to minimize latency when submitting orders to an exchange. During volatile periods, order bursts can exceed the pool's capacity, forcing some requests to queue. This simulation helps engineers analyze pool performance and determine the optimal size for capacity planning. Task Implement the function simulate_connection_pool(int pool_size, const std::vector<int>& bursts) which simulates a connection pool's response to a series of