System design concepts · Compute and concurrency

Concurrency vs Parallelism

Short answer

Concurrency is about structure: several tasks are in progress during overlapping periods of time, and the program is organized so it can switch between them. Parallelism is about execution: several computations literally run at the same instant on different cores or machines. A single core can run concurrent tasks by interleaving them, which is how an event loop serves thousands of sockets while each one waits on the network. Parallelism needs more than one execution unit and pays off for CPU-bound work that can be split into independent pieces. Concurrency helps you keep many slow, waiting tasks moving; parallelism helps you finish heavy computation sooner. A system can have either one without the other, and most servers use both.

Read the video transcript

Concurrency and parallelism sound like the same thing. They are not. One is about structure, the other is about execution. Here is one CPU core, and three requests. Each one computes for a moment, then waits on the network. With concurrency, the core never sits idle. While request A waits, it runs B, then C, then comes back to A when its data arrives. All three are in progress at once, but at any instant only one is actually running. That is how a single event loop serves thousands of sockets.

Parallelism needs more hardware. Split a job into four chunks, give it four cores, and the chunks run at the same instant. That pays off for CPU heavy work, like encoding video. But the part that must run serially, here the final merge, caps the speedup. That is Amdahl's law.

Most servers use both. One worker per core for parallelism, and an event loop inside each worker for concurrency. So, concurrency is dealing with many things at once. Parallelism is doing many things at once.

Concurrency vs Parallelism: comparison table

AspectConcurrencyParallelism
Core ideaDealing with many things at onceDoing many things at once
Hardware neededOne core is enoughMultiple cores, GPUs or machines
Main payoffThroughput and responsiveness while tasks wait on I/OLower wall-clock time for computation
Typical toolsEvent loops, async and await, coroutines, threadsThread pools sized to cores, fork and join, SIMD, GPUs, MapReduce-style jobs
Typical workloadWeb servers, chat gateways, crawlers waiting on the networkVideo encoding, model training, large sorts and aggregations
What limits itShared-state bugs: races, deadlocks, orderingThe serial part of the job (Amdahl's law), load imbalance, the cost of merging results
On one core, A, B and C take turns so all three are in progress; on three cores they run at the same instant and finish sooner.

When to use each

Lean on concurrency when

  • Work is I/O bound: most time goes to waiting on disks, networks or other services.
  • You must hold many slow or idle connections open, as in chat, streaming or long polling.
  • Latency matters and you want to overlap independent calls, such as fetching a profile and a feed at the same time.

Lean on parallelism when

  • Work is CPU bound and can be split into independent chunks.
  • A single job is too slow on one core: transcoding a video, building an index, training a model.
  • The data is large enough that spreading it across machines beats moving it to one.
The verdict

Lean on concurrency when

Work is I/O bound: most time goes to waiting on disks, networks or other services.

Otherwise

Lean on parallelism when

Work is CPU bound and can be split into independent chunks.

One server, both at once

A typical high-throughput server runs one worker process or thread per core, which gives parallelism, and inside each worker it runs an event loop or a pool of lightweight tasks, which gives concurrency. Nginx, many Node.js deployments and Go servers all follow some version of this shape.

One worker process per core runs in parallel, and inside each worker an event loop takes turns among its open connections.

Async and await on their own do not add parallelism. They let one thread juggle many waiting tasks. If a task does heavy computation inside the loop, every other task on that thread waits behind it, which is why CPU-heavy work is pushed to a separate pool.

Why parallel speedup flattens out

Amdahl's law says the part of a job that must run serially caps the speedup you can get by adding workers. If a pipeline spends a meaningful share of its time in a single-threaded merge step, adding more workers to the parallel part stops helping. In design rounds this shows up as the coordinator, the final merge or the single partition that holds a hot key.

Doubling the cores keeps shrinking the parallel part, but the serial merge stays the same length, so the speedup flattens.
Interview angle

How it comes up in a system design interview

The terms come up less as a quiz and more as a test of whether your worker model matches the workload. If you size a crawler by CPU cores, or a video pipeline by open connections, the interviewer will notice.

Where you will meet it

  • How many concurrent fetches should each crawler host run, and what bounds it: CPU, memory, sockets or politeness per domain?
  • How do you transcode a long video quickly? Split it into segments and encode them in parallel.
  • Is this service I/O bound or CPU bound, and how does that change the number of instances you need?
  • A single slow request blocks others on the same node. Why, and how do you fix it?
How a strong answer sounds
“Fetching is I/O bound, so each crawler host runs a high level of concurrency on an async client and the limit is per-domain politeness, not CPU. Parsing is CPU bound, so it runs on a separate pool sized to the number of cores, and the two are connected by a bounded queue so a slow parser applies backpressure.”

Common mistakes

  • Using the two words as synonyms. They describe different properties, one of design and one of execution.
  • Assuming async code runs in parallel. Without multiple threads or processes it is interleaving on one core.
  • Running CPU-heavy work on an event loop thread and stalling every other request on it.

Frequently asked questions

Can you have concurrency without parallelism?

Yes. A single-core machine runs many concurrent programs by time slicing, and a single-threaded event loop handles many concurrent requests by switching between them whenever one waits.

Can you have parallelism without concurrency?

Yes. A SIMD instruction that adds eight numbers at once is parallel without any notion of separate tasks, and a data-parallel loop where every element is processed independently needs no coordination between tasks.

Is multithreading concurrency or parallelism?

Threads give you concurrency. On a multi-core machine they can also run in parallel, unless the runtime prevents it, as the standard CPython build does with its global interpreter lock.

Learn and practise

Lessons

Problems where this choice matters

Knowing the trade-off is half of it

Practise saying it under follow-up questions: a timed system design interview with an AI interviewer that probes your choices and grades against a rubric.

Start a mock interview