My TypeScript Software Design & Architecture book just prelaunched! Check out solidbook.io.
Close

NodeJS Microservices Architecture

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

https://www.lynda.com/Node-js-tutorials/Implement-time-calculation/509406/555500-4.html?srchtrk=index%3a28%0alinktypeid%3a2%0aq%3anodejs%0apage%3a1%0as%3arelevance%0asa%3atrue%0aproducttypeid%3a2

  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.



Discussion

Liked this? Sing it loud and proud 👨‍🎤.


0 Comments

Be the first to leave a comment

Submit

Stay in touch!



About the author

Khalil Stemmler

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



View more in Node.js



You may also enjoy...

A few more related articles

The 6 Most Common Types of Logic in Large Applications [with Examples]
Sep 16th, 2019 / 12 min read
In this article, you'll learn about the Clean Architecture, why we should separate the concerns of large applications into layers,...
Why I Don't Use a DI Container | Node.js w/ TypeScript
Sep 16th, 2019 / 11 min read
Instead of a DI Container, I just package features by component and use logical naming conventions.
Dependency Injection & Inversion Explained | Node.js w/ TypeScript
Sep 11th, 2019 / 10 min read
Dependency Injection and Depedency Inversion are two related but commonly misused terms in software development. In this article, ...
Command Query Segregation | Object-Oriented Design Principles w/ TypeScript
Aug 29th, 2019 / 11 min read
CQS (Command-Query Segregation) is a design principle that states that a method is either a COMMAND that performs an action OR a Q...

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