An HTTP POST request sends a message directly from one microservice to another. The sender receives a direct response, so it can immediately determine whether handling succeeded or failed. section 5.7 section 5.11
A request identifies its destination with a hostname and route, such as http://history/viewed. DNS resolves the hostname to the target service's private IP address; Docker Compose supplies this behavior automatically, while Kubernetes deployment requires additional configuration. section 5.7.3 section 5.7.2
A minimal direct message has these parts:
- The sender creates the request with Node.js's built-in http library, sets method: POST, and declares application/json when sending a JSON payload. section 5.7.3
- The sender serializes the payload, writes it to the request, ends the request, and handles success and error callbacks separately. section 5.7.3
- The receiver exposes an Express POST route, reads the parsed payload from req.body, performs its operation, and returns an HTTP status. section 5.7.4
Viewed-message flow
When a user starts watching a video, the video-streaming service sends a POST request to http://history/viewed with a videoPath value. The history service extracts req.body.videoPath, stores it in its database, and responds with status 200. section 5.7.3 section 5.7.4
Upload pipeline
A browser uses fetch to POST a video to the gateway. The gateway forwards the stream to video-upload, which forwards it to video-storage; storage uploads the stream to Azure and returns success. The frontend updates its UI or displays an error. section 10.7.6













