Posts

Writing about building and shipping small, focused software products.

Historical web capacity anecdote

Web Concurrency, QPS and Latency: Estimate Capacity Carefully

Web concurrency is the amount of work in flight; QPS is requests processed per second. They are not interchangeable. Daily page views alone cannot tell you how much concurrency a service must support, because request patterns and response times matter. Keep the units explicit Metric Meaning QPS Requests per second at the measured boundary. TPS Transactions per second; define what constitutes a transaction. In-flight requests Requests started but not yet completed. Latency Time a request takes; inspect percentiles as well as averages. Page views A browsing measure that may generate several backend requests per view. For a stable system, a useful approximation is average in-flight requests = request rate × average response time. With 100 requests/second and 0.2 seconds per request, the average is about 20 in flight. This is an estimate, not a promise about peak queues or tail latency.
Historical illustration comparing concurrency and parallelism

Concurrency vs Parallelism: A Practical Programming Explanation

Concurrency organizes multiple tasks so they can make progress during overlapping periods. Parallelism executes work at the same time. A single CPU core can interleave concurrent tasks; multiple cores can execute tasks in parallel. A useful distinction Question Concurrency Parallelism What does it describe? How work is coordinated and progresses. Whether work executes simultaneously. Does it require several CPU cores? No. CPU work needs execution resources that can run simultaneously. Can threads be involved? Yes, but threads are not required. Yes, but creating threads alone does not prove simultaneous execution. The concepts overlap: a concurrent program may use parallel execution, and a sequentially designed program may delegate a particular operation to a parallel implementation.