27.2 Architecture
The internal structure of a microservice doesn’t play any major role in the overall application. Most of the time, the services are manageable in scope, so the structuring capabilities of Node.js are sufficient. What’s more important in this context are the interfaces to the outside world. The connection to the database is abstracted by the database driver and, if necessary, an object-relational mapping (ORM). For common databases, you can connect to both a local and remote database. Microservices are often delivered in containers. You can pass the connection information to them using environment variables. You can also use service discovery mechanisms such as Consul. A client library allows you to register your services ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access