Elasticsearch Registry & Components
Many of the shipped configurations make use of variable substitution to reduce repetition. |
Global Required Parameters
Name | Type | Description |
---|---|---|
client.type |
String |
The Elasticsearch client type: Default Value: es |
client.protocol |
String |
The Elasticsearch protocol to use Default Value: http |
client.host |
String |
The ES host |
client.port |
Integer |
The ES port |
client.timeout |
Integer |
Client timeout Default Value: 10000 |
Global Optional Parameters
Name | Type | Description |
---|---|---|
client.index |
String |
An alternative Elasticsearch index name. |
client.initialize |
Boolean |
Initilize the storage |
client.username |
String |
Username if using an auth mechanism like SearchGuard, Shield, etc |
client.password |
String |
Password if using an auth mechanism like SearchGuard, Shield, etc |
client.keystore.path |
String |
Path to the client KeyStore |
client.keystore.password |
String |
Password for the client KeyStore |
client.truststore.path |
String |
Path to the TrustStore |
client.truststore.password |
String |
Password for the TrustStore |
client.allowSelfSigned |
Boolean |
Trust self-signed certificates |
client.allowAnyHost |
Boolean |
Disbale hostname verification checks |
client.pollingTime |
String |
The timespan to try polling for elasticsearch |
Registry
Assign your chosen implementation as shown in the example, providing configuration.
Vert.x
"registry": {
"class": "io.apiman.gateway.engine.es.PollCachingESRegistry",
"config": {
// <registry configuration>
}
},
Servlet
apiman-gateway.registry=<IMPLEMENTATION>
Implementation | Notes |
---|---|
|
Recommended. Works well in multi-node setups. |
|
Works well in single-node setups. |
|
Only recommended for very low volume or test setups; causes remote calls to be issued on every request. |
Required Parameters
Refer also to Global Required Parameters.
Name | Type | Description |
---|---|---|
cache-polling-interval |
Integer |
Cache polling interval in seconds. Default Value: 10 Implementations: PollCachingESRegistry |
Optional Parameters
Refer also to Global Optional Parameters.
Name | Type | Description |
---|---|---|
cache-polling-startup-delay |
Integer |
Polling startup delay in seconds. Default Value: 30 Implementations: PollCachingESRegistry |
Metrics
Set the metrics implementation as shown.
Vert.x
"metrics": {
"class": "io.apiman.gateway.engine.es.ESMetrics",
"config": {
"client": {
"type": "es",
"protocol": "${apiman.es.protocol}",
"host": "${apiman.es.host}",
"port": "${apiman.es.port}"
// <metrics configuration>
}
}
}
Servlet
apiman-gateway.metrics=io.apiman.gateway.engine.es.ESMetrics
Implementation | Notes |
---|---|
|
Batching ES metrics |
Required Parameters
Refer also to Global Required Parameters.
Name | Type | Description |
---|---|---|
queue.size |
Integer |
Maximum metrics queue size Default Value: 10000 |
batch.size |
Integer |
Maximum metrics batching size Default Value: 1000 |
Components
Vert.x
"components": {
// Shared State Component Settings
"ISharedStateComponent": {
"class": "io.apiman.gateway.engine.es.ESSharedStateComponent",
"config": {
"client": {
"type": "es",
"protocol": "${apiman.es.protocol}",
"host": "${apiman.es.host}",
"port": "${apiman.es.port}"
//<configuration options>
}
}
}
}
Servlet
apiman-gateway.components.ISharedStateComponent=io.apiman.gateway.engine.es.ESSharedStateComponent
apiman-gateway.components.ISharedStateComponent.client.type=es
# <configuration options>
Required Parameters
Refer to Global Required Parameters.
Vert.x
"components": {
// Rate Limiter Component Settings
"IRateLimiterComponent": {
"class": "io.apiman.gateway.engine.es.ESRateLimiterComponent",
"config": {
"client": {
"type": "es",
"protocol": "${apiman.es.protocol}",
"host": "${apiman.es.host}",
"port": "${apiman.es.port}"
// <configuration options>
}
}
}
}
Servlet
apiman-gateway.components.IRateLimiterComponent=io.apiman.gateway.engine.es.ESRateLimiterComponent
apiman-gateway.components.IRateLimiterComponent.client.type=es
# <configuration options>
Required Parameters
Refer to Global Required Parameters.
Cache Store
Set cache store implementation as shown.
Vert.x
"components": {
// Cache Store Component Settings
"ICacheStoreComponent": {
"class": "io.apiman.gateway.engine.es.ESCacheStoreComponent",
"config": {
"client": {
"type": "es",
"protocol": "${apiman.es.protocol}",
"host": "${apiman.es.host}",
"port": "${apiman.es.port}"
// <configuration options>
}
}
}
}
Servlet
apiman-gateway.components.IRateLimiterComponent=io.apiman.gateway.engine.es.ESRateLimiterComponent
apiman-gateway.components.IRateLimiterComponent.client.type=es
# <configuration options>
Required Parameters
Refer to Global Required Parameters.