In my last article, I discussed the definition of boundaries between individual services in a microservices architecture. In this article, I talk about a strategy for making communication between microservices more flexible and reliable.
I had designed the beginning of my first microservices project. I felt that it had a very elegant design. Each microservice would eventually run in its own Docker container, hosted on Amazon’s Elastic Container Service (ECS), but for now, the services would run on my development laptop.
My microservices would communicate with each other via REST, using the publish-subscribe pattern, implemented with the Amazon Simple Notification Service (SNS). For example, when a new user signed up on the website, my Users microservice would publish a message to the “New User” SNS topic, containing the email activation link URL and the user’s email address. My Emailer microservice’s HTTP endpoint would subscribe to that topic, and when it received a POST request, it would send the email. If I later need to add additional processes when a new user signs up, I can just add new microservices that subscribe to the SNS topic. …
My name is Joe Martinez. I am a software engineer with an entrepreneurial background, and have been lately exploring microservice architecture for cloud-based solutions. This article is the first of several in which I will share with you some of my insights from my journey learning and mastering microservices from both a broad and deep perspective.