When is concurrency not important?

I’m still relatively new to Elixir, but it seems one of it’s primary selling points is concurrency. My question is, when is concurrency not important? For example, when creating web applications is there ever a time when concurrency could actually slow down the application? Is there a threshold (of page requests maybe) when concurrency would not provide a benefit? I hope this question isn’t too broad or convoluted.

:wave:

I’m still relatively new to Elixir, but it seems one of it’s primary selling points is concurrency.

It’s usually marketed for its fault-tolerance IMHO. And concurrency is one of the building blocks for achieving it.

For example, when creating web applications is there ever a time when concurrency could actually slow down the application?

Specific to elixir/erlang concurrency – too much inter-process data copying might slow-down/overwhelm your app.

Is there a threshold (of page requests maybe) when concurrency would not provide a benefit?

In terms of page requests, provided they are independent, I’d think no.

3 Likes

You might not even notice when You are using concurrency.

For example… if You are using Phoenix and Ecto, db access is done concurently, via poolboy.

If You have 100 connections, it’s more like 100 servers answering one connection each.

3 Likes