Adding a service registry
Add and configure a service registry in webMethods API Gateway before you reference it in an API.
About this task
You must have the Manage service registries functional privilege assigned to do this task.
In cluster deployments of webMethods API Gateway, you can add a service registry on any webMethods API Gateway instance. Other webMethods API Gateway instances are synchronized automatically.
Procedure
- Open the menu options and select Administration.
- Click External accounts.
- Click Add service registry.
Field Description Name The Name used by webMethods API Gateway for the instance of the service registry that you are adding. Description Description of the instance of service registry. Type Type of service registry. Available values are: SERVICE_CONSUL and EUREKA. Endpoint Configuration Endpoint URI The base URI for the service registry. It should include the IP address or the FQDN and the port on which the service registry accepts requests. Service discovery path The relative path of the service registry discovery service. webMethods API Gateway appends this path (and the service ID) to the Endpoint URI to generate a service discovery request for the service registry. Note: A service registry discovery service returns the address (IP address or FQDN) of an application instance for the requested service ID.Service registration path The relative path of the service registry registration service. webMethods API Gateway appends this path (and the service ID) to the Endpoint URI to generate a service registration request for the service registry. Note: webMethods API Gateway uses this service to register (publish) a service with the service registry.Service de-registration path The relative path of the service registry de-registration service. webMethods API Gateway appends this path (and the service ID) to the Endpoint URI to generate a service de-registration request for the service registry. Note: webMethods API Gateway uses this service to de-register (unpublish) a service with the service registry.Connection timeout (seconds) Specifies the time (in seconds) after which a connection attempt times out while communicating with the service registry. The precedence of the Connection Timeout configuration is as follows:
- If you specify a value for the Connection timeout field in routing endpoint alias, then the Connection timeout value specified in the Endpoint alias section takes precedence over the timeout values defined at the API level and the global level.
- If you specify a value 0 for the Connection timeout field in routing endpoint alias, then webMethods API Gateway uses the value specified in the Connection timeout field in the routing protocol processing step of an API. The Read Timeout value specified at an API level takes precedence over the global configuration.
- If you specify a value 0 or do not specify a value for the Connection timeout field in the routing protocol processing step at the API level or specify a value 0 at an alias level, then webMethods API Gateway uses the value specified in this pg.endpoint.connectionTimeout property.
- If you do not specify any value for pg.endpoint.connectionTimeout, then API Gateway uses the default value of 30 seconds.
Read timeout (seconds) Specifies the time (in seconds) after which a socket read attempt times out while communicating with the service registry. The precedence of the Read Timeout configuration is as follows:
- If you specify a value for the Read timeout field in routing endpoint alias, then the Read timeout value specified in the Endpoint alias section takes precedence over the timeout values defined at the API level and the global level.
- If you specify a value 0 for the Read timeout field in routing endpoint alias, then webMethods API Gateway uses the value specified in the Read timeout field in the routing protocol processing step of an API. The Read Timeout value specified at an API level takes precedence over the global configuration
- If you specify a value 0 or do not specify a value for the Read timeout field in the routing protocol processing step at the API level or specify a value 0 at an alias level, then webMethods API Gateway uses the value specified in this pg.endpoint.readTimeout property.
- If you do not specify any value for pg.endpoint.readTimeout, then API Gateway uses the default value of 30 seconds.
SSL Configuration Keystore alias List of keystores that are configured in webMethods API Gateway. It is used when the service registry is SSL enabled.Lists all available keystores. Key alias Lists all the private keys that are present in the selected keystore alias. It is used when the service registry is SSL enabled. Truststore alias A truststore contains the certificates trusted by webMethods API Gateway. If the service registry is SSL enabled its certificate should be added to the selected truststore. Basic authentication details Username The basic authentication username. Password The basic authentication password. Other configuration Heartbeat interval (This setting is applicable to Eureka service registries.) The interval at which the webMethods API Gateway sends a heartbeat message to the Eureka server to renew its leases. Eureka expects clients, such as webMethods API Gateway, to renew the lease by sending heartbeats as the heartbeat interval configured in the Eureka server. Headers Key An HTTP header key that is included in all the HTTP requests sent to the service registry. Value A value for the HTTP header key. - Click Add. The service registry is added to webMethods API Gateway.