0

recently i came across an architectural diagram in my organization, where a backend service sends messages to itself using Kafka, so basically it queues the messages and reads from the queue and processes the messages. Tried to ask the rationale behind it and the only answer i got was it was done to reduce load on the app. Is this common practice and what are the cases where you’d approach such an implementation.

Not sure if it is helpful to mention this but the service is written in Go

1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Sep 11, 2022 at 15:26

1 Answer 1

1

Often message queues are used to distribute work across several workers, so it might be interesting to know whether this app is actually running as several processes or at least several threads within one service process.

The reason you were told is somewhat questionable without some more information. By itself, using a message queue does not reduce load, but it can be useful in distributing the load among multiple workers. But even in a single-thread situation, its persistence may be a desirable feature to ensure processing of all tasks, even if the server process is shut down temporarily. An in-process queue cannot guarantee this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.