I'd like to implement the demo app in Python with REST API. First I start the eureka server in Tomcat at
http://lxdm123m7:8080/eureka/.
Here are the steps the sample service:
1. Register with Eureka
curl -X POST /eureka/v2/apps/sampleservice
with data. Note: Post failed with 404. Is there anything I need to do before POST?
<instance>
<hostName>lxdm123m7</hostName>
<app>sampleservice</app>
<ipAddr></ipAddr>
<vipAddr>
sampleservice.mydomain.net</vipAddr>
<secureVipAddress>
sampleservice.mydomain.net</secureVipAddress>
<status>UP</status>
<port>8080</port>
<securePort>8080</securePort>
<dataCenterInfo>
<name>MyOwn</name>
</dataCenterInfo>
</instance>
2. Looping to wait for coming requests. Question: does the service need to send heartbeat manually every 30 seconds? (
PUT /eureka/v2/apps/
sampleservice/
lxdm123m7)3. Un-register the service with Eureka
DELETE /eureka/v2/apps/
sampleservice/
lxdm123m7
Steps for sample service client:
1. Find all the instances providing sampleservice
GET /eureka/v2/apps/sampleservice
2. Does the client pick on itself from the list returned? How the round-robin works here?
3. Connect to the host and port of the service
Please advise anything I missed here.
Ying-Yi