https://github.com/spencergibb/spring-cloud-netflix-eureka-lite
A proxy for Netflix Eureka that allows clients written in other languages to use Eureka with a simple HTTP API.
https://github.com/spencergibb/spring-cloud-netflix-eureka-lite
cloud-native java microservices netflix-eureka spring spring-boot spring-cloud spring-cloud-netflix
Last synced: over 1 year ago
JSON representation
A proxy for Netflix Eureka that allows clients written in other languages to use Eureka with a simple HTTP API.
- Host: GitHub
- URL: https://github.com/spencergibb/spring-cloud-netflix-eureka-lite
- Owner: spencergibb
- License: apache-2.0
- Created: 2016-06-21T00:24:56.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2023-04-28T19:53:25.000Z (about 3 years ago)
- Last Synced: 2025-02-28T13:47:25.003Z (over 1 year ago)
- Topics: cloud-native, java, microservices, netflix-eureka, spring, spring-boot, spring-cloud, spring-cloud-netflix
- Language: Java
- Homepage:
- Size: 96.7 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Eureka Lite
Run `EurekaLiteApplication` which has the `@EnableEurekaLite` annotation.
```
$ http --print=b POST :8762/apps name=myapp instance_id=app1 hostname=localhost port=8081 > /tmp/eureka_myapp_app1.json && cat /tmp/eureka_myapp_app1.json
$ http POST :8762/apps name=myapp instance_id=app2 hostname=localhost port=8082
$ http POST :8762/apps name=anotherapp instance_id=anotherapp1 hostname=localhost port=8181
# in another terminal
$ watch -n30 http --print=b PUT :8762/apps/myapp/app1 < /tmp/eureka_myapp_app1.json
# eventually anotherapp/anotherapp1 will auto unregister from eureka because it isn't sending heartbeats
$ http DELETE :8762/apps/myapp/app2
$ http GET :8762/apps
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Date: Mon, 20 Jun 2016 22:35:59 GMT
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
X-Application-Context: application:8762
[
{
"application": {
"hostname": "localhost",
"instance_id": "app2",
"name": "myapp",
"port": 8082
},
"status": "DOWN"
},
{
"application": {
"hostname": "localhost",
"instance_id": "app1",
"name": "myapp",
"port": 8081
},
"status": "UP"
},
{
"application": {
"hostname": "localhost",
"instance_id": "anotherapp1",
"name": "anotherapp",
"port": 8181
},
"status": "UP"
}
]
$ http GET :8762/apps/anotherapp
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Date: Mon, 20 Jun 2016 22:41:27 GMT
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
X-Application-Context: application:8762
[
{
"application": {
"hostname": "localhost",
"instance_id": "anotherapp1",
"name": "anotherapp",
"port": 8181
},
"status": "UP"
}
]
$ http GET :8762/apps/myapp/app1
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Date: Mon, 20 Jun 2016 22:44:11 GMT
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
X-Application-Context: application:8762
{
"application": {
"hostname": "localhost",
"instance_id": "app1",
"name": "myapp",
"port": 8081
},
"status": "UP"
}
```
## Todo
- [X] Register
- [X] Heartbeat
- [X] Delete
- [X] List
- [X] @EnableEurekaLite
- [ ] Tests
- [ ] Remove Eureka Client
- [ ] Move to Spring Cloud project layout