#Sample Plugin - Eureka
##Overview This plugin integrates with NetFlix's Eureka. Eureka is a REST (Representational State Transfer) based service that is primarily used in the AWS cloud for locating services for the purpose of load balancing and failover of middle-tier servers.
##Enable the plugin Include the plugin the in plugin sequence of {org}-{env}-config.yaml file:
plugins:
sequence:
- oauth
- eurekaclient
##Configure the plugin The plugin configuration has three parts:
eurekaclient: instance: app: microgateway vipAddress: microgateway dataCenterInfo: name: MyOwn eureka: host: localhost port: 8761 servicePath: /eureka/apps/ lookup: - uri: /book app: BOOK secure: false - uri: /httpbin app: BOOK secure: false
###Lookup Configuration Eureka registers apps (BOOK in the example above). There needs to be a mapping to map the API Proxy basePath to an app registered on Eureka. In the example above, the basePath /httpbin and /book maps to the BOOK app.
NOTE: If a mapping is not found, then the plugins forwards the API traffic as configured in the proxy.