Kawhan Laurindo

WHOISKAWHAN / SOFTWARE ENGINEER / João Pessoa

Language

PROJECTS / 2023

Opportunity Microservices

Opportunity again, this time split into microservices with Spring Boot, Eureka for service discovery and a gateway handling authentication. The question was whether I could make it scale without turning it into a distributed mess.

OVERVIEW

A proof of concept for a Distributed Systems course: Opportunity rewritten as microservices. One service handles authentication, another handles job openings, and both register with Netflix Eureka — nobody needs to know anybody else's IP or port. All traffic comes in through a gateway that routes each request to the right service.

CONCEPT

Service discovery and an API gateway. Instead of hard-coded addresses, each service announces itself to Eureka and sends heartbeats to prove it is alive; the gateway reads that registry to decide where to route. Each microservice owns its database, trading immediate consistency for independence: you can scale, deploy or take down one service without dragging the rest along.

FEATURES

  • Service registration and discovery with Netflix Eureka
  • Gateway as the single entry point
  • Authentication microservice
  • Job openings microservice
  • Service-to-service calls with OpenFeign

HOW IT WORKS

The Eureka server starts first, then the two microservices, which register with it, and finally the gateway on port 9000, which starts taking requests. The Eureka dashboard shows which instances are registered and healthy. Data lives in H2 for simplicity, though nothing stops you from swapping in PostgreSQL.

STACK

  • Java
  • Spring
  • Docker
Back to portfolio