NodeJS Microservices Architecture
- Why Microservices
1.1 They're non monolithic.
1.2 Easy to add new parts to your application.
- They should only solve one particular problem.
1.3 Easier to test
1.4 Easier for new developers to understand.
1.6 We can write microservices in whatever language is best for the job
- Another approach is to have a common table in a database somewhere, and then write to that from one microservice
- Let's say you needed to write a microservice in Python but your core application is written in NodeJS. Not a problem. Microservices communicate over HTTP using JSON.
- Building a Microservice architecture in NodeJS
2.1 Create a service
2.2 Create a Service Registry and Request Handler
2.3 Connect your service to the Service Registry
- Moving forward
3.1 It scales
- when we need to serve more requests, we just
- There should be specific rules to what your route
3.3 Create more microservices
3.4 Communicating between microservices
- All you have to do is feed the response from one microservice back to another one.
Liked this? Sing it loud and proud 👨🎤.
Stay in touch!
View more in Node.js
You may also enjoy...
A few more related articles
Learn how to use DDD and object-oriented programming concepts to model complex Node.js backends.
In software, change is inevitable. The more complex the software, the more it should be enabled to be changed. The SOLID principles are a set of principles all developers should know about in order to design robust, maintainable, and flexible software.
Want to be notified when new content comes out?
Join 2000+ other developers learning about Domain-Driven Design and Enterprise Node.js.
I won't spam ya. 🖖 Unsubscribe anytime.