Service Discovery
- Service Discovery Using Eureka
- Spring Cloud - Creating Eureka Server
- Spring Cloud - Creating Eureka Client
- Eureka Client Consumer Example
- Spring Cloud - Eureka Server API
- Spring Cloud - Eureka High Availablity
- Spring Cloud - Eureka Zone Awareness
Synchronous Communication
- Synchronous Communication with Feign Client
- Spring Cloud - Feign Client with Eureka
- Spring Cloud - Testing Feign Client
Synchronous Communication
- Spring Cloud - Gateway
- Spring Cloud - Creating Gateway Application
- Spring Cloud - Testing Gateway Application
- Spring Cloud - Monitoring Gateway Application
Miscellaneous
- Spring Cloud - Load Balancer
- Circuit Breaker using Hystrix
- Streams with Apache Kafka
- Distributed Logging using ELK and Sleuth
Spring Cloud Useful Resources
Spring Cloud - Eureka Server API
Eureka Server provides various APIs for the client instances or the services to talk to. A lot of these APIs are abstracted and can be used directly with @DiscoveryClient we defined and used earlier. Just to note, their HTTP counterparts also exist and can be useful for Non-Spring framework usage of Eureka.
We can use Server API to get the information about the client running EurekaClient can also be invoked via the browser using http://localhost:8761/eureka/apps/eurekaclient as can be seen here −
Example - Eureka Server API Usage via browser
Hit http://localhost:8761/eureka/apps/eurekaclient and verify the browser output as shown below −
<application>
<name>EUREKACLIENT</name>
<instance>
<instanceId>Home:eurekaclient</instanceId>
<hostName>Home</hostName>
<app>EUREKACLIENT</app>
<ipAddr>192.168.31.173</ipAddr>
<status>UP</status>
<overriddenstatus>UNKNOWN</overriddenstatus>
<port enabled="true">8080</port>
<securePort enabled="false">443</securePort>
<countryId>1</countryId>
<dataCenterInfo class="com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo">
<name>MyOwn</name>
</dataCenterInfo>
<leaseInfo>
<renewalIntervalInSecs>30</renewalIntervalInSecs>
<durationInSecs>90</durationInSecs>
<registrationTimestamp>1759835254121</registrationTimestamp>
<lastRenewalTimestamp>1759836004625</lastRenewalTimestamp>
<evictionTimestamp>0</evictionTimestamp>
<serviceUpTimestamp>1759835253497</serviceUpTimestamp>
</leaseInfo>
<metadata>
<management.port>8080</management.port>
<jmx.port>63088</jmx.port>
</metadata>
<homePageUrl>http://Home:8080/</homePageUrl>
<statusPageUrl>http://Home:8080/actuator/info</statusPageUrl>
<healthCheckUrl>http://Home:8080/actuator/health</healthCheckUrl>
<vipAddress>eurekaclient</vipAddress>
<secureVipAddress>eurekaclient</secureVipAddress>
<isCoordinatingDiscoveryServer>false</isCoordinatingDiscoveryServer>
<lastUpdatedTimestamp>1759835254121</lastUpdatedTimestamp>
<lastDirtyTimestamp>1759835253411</lastDirtyTimestamp>
<actionType>ADDED</actionType>
</instance>
</application>
Useful Server APIs
Few other useful APIs are −
| Action | API |
|---|---|
| Register a new service | POST /eureka/apps/{appIdentifier} |
| Deregister the service | DELTE /eureka/apps/{appIdentifier} |
| Information about the service | GET /eureka/apps/{appIdentifier} |
| Information about the service instance | GET /eureka/apps/{appIdentifier}/{instanceId} |
More details about the programmatic API can be found here https://javadoc.io/doc/com.netflix.eureka/eureka-client/latest/index.html