Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

cookpad/sds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sds

Envoy's v1 Service Discovery Service API and v2 Endpoint Discovery Service API. In contrast of https://github.com/lyft/discovery, the sds allow users to serve multiple application instances of single service in single host instance (with single ip address).

Maintenance notice

This project is no longer maintained.

Endpoints

v1 SDS

GET /v1/registration/:name/

Responses v1 SDS data: https://www.envoyproxy.io/docs/envoy/v1.8.0/api-v1/cluster_manager/sds

v2 EDS

POST /v2/discovery:endpoints

Accepts v2 DiscoveryRequest, then responses v2 DiscoveryResponse.

Registration

POST /v1/registration/:name/

Request body

{
  ip: String,
  port: u16,
  revision: String,
  tags: {
    az: String,
    region: String,
    instance_id: String,
    canary: bool,
    load_balancing_weight: Option<u8>,
  },
}

Responses 202 on success, 400 on bad requests, 500 for internal server errors.

Deregistration

DELETE /v1/registration/:name/:ip_addr_and_port/

e.g. DELETE /v1/registration/user_service/10.0.0.10:34005/

Responses 202 on success, 400 on bad requests, 500 for internal server errors, and response 400 with JSON message when the entry not found:

{
  "id": "HostNotFound",
  "reason": "Not found the entry"
}

Environment variables

Createing DynamoDB table

  • Create with PK: service as String and ip_port as String
  • Set TTL setting using expire_time key

IAM permissions

  • DynamoDB's query, put_item, delete_item

About

Envoy's v1 Service Discovery Service API and v2 Endpoint Discovery Service API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published