← Back to context

Comment by Aurornis

3 days ago

Monoliths also have to scale to multiple servers eventually, so message queues are an important architectural component to understand regardless of the organization of your services.

Even without multiple servers a single server itself has many cores. So if you aren't using multiple threads you are leaving performance on the table.

  • A single multithreaded process usually doesn’t need an external message queue for sharing, though.

    I guess if you’re stuck with a single threaded language you would want a message queue though.

    • No one specified external message queue. You can have a message queue within the process itself that can deliver messages from one thread to another. There are different kinds of messages queues for this purpose depending on how many threads will be producing messages to the message queue and how many threads will be consuming messages from it. While using message queues may not be neccessary for multithreading it is a very common setup. The ability to have a message queue to schedule work on a background thread is very common between many programs.