Microservices

Article 04: Running Multiple Microservices Locally

By Utility Zone · 2026-01-28T11:01:20.417641

1. Objective

Learn how to run and manage multiple microservices on your local machine.

2. Key Concepts

  • Port management
  • Environment-based configuration
  • Service isolation

3. Problem Statement

When you have multiple microservices:

  • Port conflicts occur
  • Configurations differ per service

4. Hands-On: Add Order Service

Create another Spring Boot app:

  • Name: order-service
  • Port: 8082

application.yml:

server:
  port: 8082
spring:
  application:
    name: order-service

5. Running Services

Run:

  • user-service on 8081
  • order-service on 8082

Verify:

6. Testing with Postman

  • Create requests for each service
  • Validate independent behavior

7. Environment Profiles

spring:
  profiles:
    active: dev

8. Common Mistakes

  • Using same port
  • Sharing database
  • Tight coupling between services

9. Interview Notes

  • Local setup mimics real microservice environments
  • Profiles help manage configs cleanly

10. Summary

You can now run multiple microservices independently on your system.

11. What’s Next

Enable communication between microservices.