Web Development · WDC-43

Building Microservices with Node.js

Building Microservices with Node.js is a course in designing and building microservices with Node.js 24 LTS, Fastify 5 and Express 5, from splitting services and building an API gateway to messaging with RabbitMQ, running everything on Docker Compose and tracing with OpenTelemetry. It suits Node.js and backend developers and DevOps teams who want to break a monolith into services.

Updated
From 4,950 THB / person 5,500 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration12 hours · 2 days
  • FormatOnsite / live online
  • Next roundOn request
  • CertificateIncluded

Course overview

Microservices split a large system into small services that can be developed, deployed and scaled independently, so teams ship faster and scale only the parts under heavy load. Node.js suits this well because it is lightweight, starts quickly and handles large amounts of I/O. Splitting services without clear principles, though, often produces a system more complex than before: chains of calls that fail together, data that disagrees between services, and problems nobody can locate.

This course builds a microservices system with Node.js without relying on a large framework. It starts by splitting services along business lines, setting up a Node.js 24 LTS project with ES modules, building services with Fastify 5 and Express 5, giving each service its own database, calling between services over HTTP resiliently and building an API gateway. It then covers event-based messaging with RabbitMQ, keeping data consistent across services, running the whole system with Docker Compose, load balancing with NGINX and observing it with OpenTelemetry, finishing with a workshop on a microservices trip booking system. (2 days, 6 hours per day, 12 hours in total, Intermediate level.)

What you’ll gain

  • Understand microservices architecture, how it differs from a monolith and when it is worth using
  • Split services along business lines and design each service to own its data
  • Build services with Node.js 24 LTS, Fastify 5 and Express 5, with validation and OpenAPI
  • Build an API gateway and call other services over HTTP with timeouts and retries
  • Communicate through events with RabbitMQ and handle data that must stay consistent across services
  • Run the whole system with Docker Compose, scale it with NGINX and observe it with logs, health checks and OpenTelemetry

Who this course is for

  • Node.js developers who want to break a monolith into microservices
  • Backend and full-stack developers working in JavaScript or TypeScript
  • System administrators and DevOps teams who deploy and run multi-service systems
  • Students, teachers and anyone with Node.js basics who wants to understand microservices hands-on

Prerequisites

  • JavaScript, including functions, objects, arrays, async and await
  • Some experience building REST APIs with Node.js
  • Basic database and command-line skills
  • A laptop that can run the Node.js LTS release, Docker Desktop and VS Code

Curriculum

Course Details

This course is the 2026 edition of Building Microservices with Node.js. It runs for 2 days, 6 hours per day (12 hours in total, 09:00-16:00), as lectures with labs. Intermediate level. This edition moves to Node.js 24 LTS with ES modules, uses Fastify 5 as the main framework alongside Express 5, replaces PM2 with Docker Compose as the main deployment method, and adds event-based messaging with RabbitMQ and

observability with OpenTelemetry. It keeps the original core of microservices architecture design, splitting services by business process, MongoDB, the API gateway, Docker, scaling and load balancing with NGINX, and monitoring and alerting when a service fails. This edition drops the React test harness and uses plain Node.js without a large framework, unlike the NestJS microservices course. Learners take home a lab guide and the source code of a microservices trip booking system.

Day 1 Designing and Building Services

Section 1: What Microservices Are and When to Use Them

  • How a monolith, a modular monolith and microservices differ
  • Split services by business capability using bounded contexts
  • The costs you pay: networking, data, deployment and observability
  • Lab: split a trip booking system into services and draw the architecture

Section 2: Lab: Setting Up a Node.js 24 LTS Project

  • A monorepo with npm workspaces compared with multiple repositories
  • ES modules, async and await, and EventEmitter as used in services
  • node --watch, --env-file and the built-in test runner (node:test)
  • Lab: a project skeleton with several services and a shared library

Section 3: Lab: A First Service with Fastify 5

  • Routes, plugins and validation with JSON Schema
  • Logging with Pino and generating OpenAPI documentation automatically
  • Compared with Express 5: routers, middleware and async error handling
  • Lab: a Catalog service with a CRUD API, schemas and documentation

Section 4: Lab: Data Ownership per Service

  • Database per service, and why services should not share a database
  • Connect to MongoDB on Docker and design each service's data
  • API composition when a screen needs data from several services
  • Lab: a Booking service with its own separate database

Section 5: Lab: Calling Other Services Resiliently over HTTP

  • Call services with Node.js built-in fetch and AbortSignal.timeout
  • Retries with backoff, idempotency keys and preventing duplicate calls
  • The circuit breaker idea and fallbacks when a dependency is down
  • Lab: Booking calls Catalog to check availability and copes when Catalog is down

Section 6: Lab: API Gateway

  • What an API gateway does: routing, authentication and rate limiting
  • Build a gateway with Fastify, @fastify/http-proxy and @fastify/rate-limit
  • Verify JWTs at the gateway and pass user details on to services
  • Lab: put every service behind a single gateway
Day 2 Messaging, Deployment and Observability

Section 7: Lab: Event-Based Messaging with RabbitMQ

  • Synchronous versus asynchronous, and when to use events
  • Exchanges, queues, routing keys and durable queues
  • Write publishers and consumers with amqplib, with acks and prefetch
  • Lab: Booking sends an event for the Notification service to email a confirmation

Section 8: Keeping Data Consistent Across Services

  • Eventual consistency and what users see in the meantime
  • Choreography-based sagas and compensating when a step fails
  • The outbox pattern and consumers that handle duplicate messages safely
  • Lab: cancel a booking automatically when payment fails

Section 9: Lab: Running the Whole System with Docker Compose

  • Multi-stage Dockerfiles for Node.js and running as a non-root user
  • Docker Compose for every service, MongoDB and RabbitMQ
  • Environment variables, health checks and start-up order
  • PM2 compared with containers, and an overview of moving to Kubernetes

Section 10: Lab: Scaling and Load Balancing with NGINX

  • Design stateless services so you can add instances
  • NGINX upstreams with round robin and least_conn
  • Graceful shutdown on SIGTERM
  • Lab: add Catalog instances and test them under heavy request load

Section 11: Lab: Logs, Health Checks and Tracing

  • Structured logs with Pino and correlation IDs across services
  • Health and readiness endpoints for Docker and load balancers
  • Distributed tracing with OpenTelemetry, viewed in Jaeger
  • Lab: find the service that slows a request down from its trace

Section 12: Workshop: A Microservices Trip Booking System

  • Bring the Catalog, Booking, Payment and Notification services together
  • Test services with node:test and test the whole system on Docker Compose
  • Switch some services off and see how the system copes
  • Present the work, review it together and wrap up with a pre-production checklist

Schedule & training options

For individuals — public rounds

No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

How do microservices differ from a monolithic application?

A monolith bundles every function into one application deployed as a whole. Microservices split the system into small services along business lines, each with its own code and database, communicating through APIs or events and deployed or scaled independently. Teams gain independence and can scale only the busy parts, at the cost of more complexity in networking, data, deployment and observability, which is why smaller systems often start as a modular monolith.

Why does this course use Fastify alongside Express?

Fastify 5 is a lightweight, fast framework with built-in JSON Schema validation, Pino logging and a plugin system, which suits building many services to one standard. Express 5 is already used by many teams, and version 5 forwards errors from async handlers to error middleware automatically. The course uses Fastify as the main framework and compares it with Express 5 so you can apply the same principles to your team's existing code.

What is an API gateway, and how necessary is it in a microservices system?

An API gateway is a single entry point that receives client requests and forwards them to the right microservice, so clients do not need to know where each service lives. Beyond routing, it centralises shared concerns such as authentication, rate limiting and logging. You can write one in Node.js or use NGINX or a cloud service. This course builds a gateway with Fastify and uses NGINX for load balancing.

How do you load balance a Node.js app with NGINX?

Run several instances of the same service, for example several containers in Docker Compose. In the NGINX config, create an upstream block listing every instance, then point a location at it with proxy_pass. Check the file with nginx -t and reload NGINX. Requests are spread round robin by default, and you can switch to least_conn. Services should be stateless and shut down gracefully on SIGTERM.

Who is Building Microservices with Node.js for, and what should I know beforehand?

It suits Node.js developers, backend and full-stack developers, system administrators and DevOps teams, as well as students, teachers and anyone who wants to understand microservices hands-on. You should be able to write JavaScript including async and await, have built a REST API with Node.js, have basic database and command-line skills, and bring a laptop that can run the Node.js LTS release and Docker Desktop.

Can Building Microservices with Node.js be run in-house for our team?

Yes. It can be run in-house for your team, with examples adapted to your own work, such as splitting services out of a system your team maintains or using the message broker and databases your organisation already runs. You can request a quotation from this page, or contact us on LINE @itgenius or by phone on 02-570-8449.