Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Nelsoncg98/InnovaTech/llms.txt

Use this file to discover all available pages before exploring further.

The Eureka Server is the service registry at the heart of the InnovaTech SOA platform. Rather than hardcoding the network address of every microservice into callers, each service registers itself with Eureka on startup and discovers its peers by looking them up by name. This decouples service consumers from the physical addresses of their dependencies, making the system resilient to port changes, horizontal scaling, and environment differences between development and production.

Overview

The server runs on port 8761, the conventional default for Netflix Eureka. It is annotated with @EnableEurekaServer, which activates the full Eureka registry and web dashboard within the Spring Boot application. The instance is configured in standalone mode — it does not attempt to register itself as a Eureka client or fetch the registry from a peer node, keeping the local development topology simple.

Port

8761 — standard Eureka default port

Spring Boot

3.1.2 with Spring Cloud 2022.0.4

Mode

Standalone — no peer replication

Dashboard

Web UI available at http://localhost:8761

Application Entry Point

The application is a minimal Spring Boot main class. The single @EnableEurekaServer annotation is all that is required to activate the Eureka registry; Spring Cloud auto-configures everything else based on properties.
package com.innovatech.eureka;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

@SpringBootApplication
@EnableEurekaServer
public class EurekaServerApplication {
    public static void main(String[] args) {
        SpringApplication.run(EurekaServerApplication.class, args);
    }
}

Configuration

The application.yml file configures Eureka to run as a self-contained standalone server. The two critical flags — register-with-eureka: false and fetch-registry: false — prevent the server from treating itself as a client and endlessly trying to register with itself or replicate state to a non-existent peer.
server:
  port: 8761

eureka:
  instance:
    hostname: localhost
  client:
    register-with-eureka: false
    fetch-registry: false
    service-url:
      defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
PropertyValueDescription
server.port8761Port the Eureka server listens on
eureka.instance.hostnamelocalhostHostname advertised to clients
eureka.client.register-with-eurekafalsePrevents the server from self-registering as a client
eureka.client.fetch-registryfalsePrevents the server from fetching its own registry
eureka.client.service-url.defaultZonehttp://localhost:8761/eureka/The registry URL (used by client services to register)

Accessing the Dashboard

When the server is running, Netflix Eureka provides a built-in web dashboard that shows all currently registered instances, their health status, and metadata such as IP address and port. Open the following URL in a browser:
http://localhost:8761
The dashboard displays:
  • System Status — uptime, environment, and data center
  • Instances currently registered with Eureka — a table listing each service by application name, availability zone, and status
  • General Info — total registered services and renewal thresholds

Service Registration

Any microservice that includes spring-cloud-starter-netflix-eureka-client on its classpath will auto-register with Eureka on startup. The two key properties that client services must set are:
eureka:
  client:
    service-url:
      defaultZone: http://localhost:8761/eureka/
  instance:
    prefer-ip-address: true
PropertyPurpose
eureka.client.service-url.defaultZonePoints the client at the Eureka server’s registration endpoint
eureka.instance.prefer-ip-address: trueRegisters the service’s IP address rather than its hostname, which is more reliable in containerized or multi-network environments
In the InnovaTech platform, servicio-inventario is an example of a service that uses these exact settings — see its configuration in the Inventory Service page.
The Eureka Server must be started before any other microservice. If a client service starts before Eureka is available, it will fail to register and its endpoints will not be discoverable by other services. When running locally, always start eureka-server first, then start the downstream services.

Running the Server

cd eureka-server
mvn spring-boot:run
The server is ready when you see a log line similar to:
Started EurekaServerApplication in 4.3 seconds (JVM running for 4.7)

Build docs developers (and LLMs) love