No special messages at the moment. Just have a good day and stay hydrated!

NodeJS Microservices Architecture

Jul 13th, 2018 / 1 min read / Share / Edit on GitHub
Microservices architecture are

  1. 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.5 Resiliency

1.6 We can write microservices in whatever language is best for the job

1.7 Efficient

- 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.


  1. 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

  1. Moving forward

3.1 It scales

- when we need to serve more requests, we just

3.2 Security

- 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.


Thoughts? Share the article if you think it'll be useful to someone + join the discussion about this post on Twitter!

Stay in touch!

About the author

Khalil Stemmler

Khalil Stemmler is a Developer / Designer and co-founder of Univjobs. He frequently publishes articles about Advanced TypeScript & Node.js best practices for large-scale applications.

View more in Node.js

You may also enjoy...

A few more related articles

Name, Construct & Structure | Organizing Readable Code - Part 1
Jun 15th, 2019 / 6 min read
Naming files & folders well, using well-understood technical constructs and strategically organizing files well are three ways to ...
Domain Knowledge & Interpretation of the Single Responsibility Principle | SOLID Node.js + TypeScript
Jun 13th, 2019 / 8 min read
The Single Responsibility Principle specifies that a class or function should only have one reason to change. Admittedly, that's n...
Over $85 billion spent on fixing bad code [bootcamps, junior devs, JavaScript, and software design principles]
Jun 7th, 2019 / 10 min read
More and more money is being spent by companies on maintaining bad JavaScript code. Here's where I think our industry needs to cha...
Clean Node.js Architecture | Enterprise Node.js + TypeScript
Jun 6th, 2019 / 7 min read
In this article, we'll look at the various different versions of the "clean architecture", simplify it, and understand how we can ...

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.

Get updates