Applying Concurrency to Our Microservice

Dear forum members,

I am currently working on a microservice that consists of four processes. These processes have dependencies between them. Specifically:

  1. Process 2 depends on Process 1.
  2. Processes 3 and 4 depend on Process 2.

I would like to apply concurrency to enhance performance, but I’m unsure how to proceed. Any guidance or best practices would be greatly appreciated.

Thank you!

There are many different ways to do this, I can’t give a generic example because it depends on your implementation, Go makes it easy to write correct concurrent code with Goroutines, study a little about Goroutines and you will certainly have ideas on how to implement this in your service.

I would recommend the talk “Concurrency is not Parallelism” by Rob Pike, it’s not directly related to your question of “how to proceed”, but maybe it makes you understand the concurrent code theory in Go, and why there’s not just one way to do things.

(I think the talk is available on youtube, try to find a version that shows the slides)

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.