UNPKG

1.43 kBMarkdownView Raw
1# Sample Plugin - Eureka
2
3## Overview
4This plugin integrates with [NetFlix's Eureka](https://github.com/Netflix/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.
5
6
7## Enable the plugin
8Include the plugin the in plugin sequence of ```{org}-{env}-config.yaml``` file:
9```
10 plugins:
11 sequence:
12 - oauth
13 - eurekaclient
14```
15
16## Configure the plugin
17The plugin configuration has three parts:
18* (instance) Defining the microgateway instance. This registers microgateway with Eureka
19* (eureka) Provide the endpoint details to where Eureka is hosted
20* (lookup) See below for details
21```
22eurekaclient:
23 instance:
24 app: microgateway
25 vipAddress: microgateway
26 dataCenterInfo:
27 name: MyOwn
28 eureka:
29 host: localhost
30 port: 8761
31 servicePath: /eureka/apps/
32 lookup:
33 -
34 uri: /book
35 app: BOOK
36 secure: false
37 -
38 uri: /httpbin
39 app: BOOK
40 secure: false
41```
42
43### Lookup Configuration
44Eureka 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.
45
46NOTE: If a mapping is not found, then the plugins forwards the API traffic as configured in the proxy.
47
48
49
\No newline at end of file