Comparison
ConcurrencyvsParallelism
Concurrency
your service is handling four hundred requests at once on eight cores, interleaving them whenever one is waiting on I/O.
Dealing with more than one task in overlapping time periods — a structure, not a hardware property. A single core can be highly concurrent, because most tasks spend their time waiting. Concurrency is what creates the need for locks and ordering guarantees; whether the tasks literally run simultaneously is a separate question.
Full entry →Parallelism
you split the batch across eight cores so eight rows are genuinely being computed at the same instant.
Executing multiple computations literally simultaneously on multiple execution units. It is an implementation strategy for making concurrent work faster, and it only helps CPU-bound work. Adding parallelism to an I/O-bound service does nothing except increase contention.
Full entry →