> For the complete documentation index, see [llms.txt](https://rair.gitbook.io/knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rair.gitbook.io/knowledge-base/streaming-node/microservices.md).

# Microservices

RAIR should be developed using the Twelve-Factor App principles so that the architecture is elastic, agile, ephemeral, easily deploy-able.

&#x20;

In the modern era, software is commonly delivered as a service: called *web apps*, or *software-as-a-service*. The twelve-factor app is a methodology for building software-as-a-service apps that:

* Use **declarative** formats for setup automation, to minimize time and cost for new developers joining the project;
* Have a **clean contract** with the underlying operating system, offering **maximum portability** between execution environments;
* Are suitable for **deployment** on modern **cloud platforms**, obviating the need for servers and systems administration;
* **Minimize divergence** between development and production, enabling **continuous deployment** for maximum agility;
* And can **scale up** without significant changes to tooling, architecture, or development practices.

The twelve-factor methodology can be applied to apps written in any programming language, and which use any combination of backing services (database, queue, memory cache, etc). For more information[ see The Twelve-Factor App](https://12factor.net/)

## **What are microservices?** <a href="#what-are-microservices" id="what-are-microservices"></a>

In software [application development](https://www.cuelogic.com/outsource-software-development), microservices are a style of **service-oriented architecture** (SOA) where the app is structured on an assembly of interconnected services. With microservices, the application architecture is built with lightweight protocols. The services are finely seeded in the architecture. Microservices disintegrate the app into smaller services and enable improved modularity.&#x20;

Compared to its predecessor, the [monolithic architecture](https://www.cuelogic.com/blog/why-to-evolve-from-monolithic-to-microservices-architecture), microservices are hands down more beneficial. You don’t need to stuff all software components and services in one big container and pack them tightly. With microservices, you can build an app with:

* greater flexibility,
* high scalability,
* continuous development,&#x20;
* systematic data organization,
* time optimization, and
* reliability.

Further reason and examples below for nodejs--

[How to build a microservices architecture with Node.Js?](https://www.cuelogic.com/blog/microservices-with-node-js)

[![](https://developer.okta.com/assets-jekyll/favicon/favicon-16x16.png)Node Microservices: From Zero to Hero](https://developer.okta.com/blog/2020/02/05/node-microservices-zero-to-hero)

&#x20;

Toolkit to assist with nodejs microservice design praxis:

[![](https://senecajs.org/images/favicon.png)Seneca, a microservices toolkit for Node.js](https://senecajs.org/)

***

Further reading on microservices:

[![](https://cdn.infoq.com/statics_s1_20220224031723/favicon.ico)Principles for Microservice Design: Think IDEALS, Rather than SOLID](https://www.infoq.com/articles/microservices-design-ideals/)

[![](https://idge.staticworld.net/ifw/favicon.ico)What are microservices? Your next software architecture](https://www.infoworld.com/article/3445043/what-are-microservices-your-next-software-architecture.html)

## Why microservices? <a href="#why-microservices" id="why-microservices"></a>

RAIR is designed for at scale deployabilty on kubernetes with modern cloud architecture. To benefit from modern continuous integration and continuous deployment, microservice design practice allows all developers to work in tandem without conflict, and or all changes to be quickly tested and deployed in an automated fashion (AGILE). This is all designed in easily created dockers, improving upon the docker systems immensely. For more information:

[![](https://goteleport.com/favicon.ico)What is Microservice? What is Kubernetes for?](https://goteleport.com/blog/microservices-containers-kubernetes/)
