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: jest

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

String

Path to the client keystore

client-keystore.password

String

Password for the client keystore

trust-store

String

Path to the trust store

trust-store.password

String

Password for the trust store

Registry

Assign your chosen implementation as shown in the example, providing configuration.

"registry": {
  "class": "io.apiman.gateway.engine.es.PollCachingESRegistry",
  "config": {
    // <registry configuration>
  }
},
apiman-gateway.registry=<IMPLEMENTATION>
Table 1. Available implementations:
Implementation Notes

io.apiman.gateway.engine.es.PollCachingESRegistry

Recommended. Works well in multi-node setups.

io.apiman.gateway.engine.es.CachingESRegistry

Works well in single-node setups.

io.apiman.gateway.engine.es.ESRegistry

Only recommended for very low volume or test setups; causes remote calls to be issued on every request.

Required Parameters

Name Type Description

cache-polling-interval

Integer

Cache polling interval in seconds.

Default Value: 10 Implementations: PollCachingESRegistry

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.

"metrics": {
  "class": "io.apiman.gateway.engine.es.ESMetrics",
  "config": {
    "client": {
       "type": "jest",
       "protocol": "${apiman.es.protocol}",
       "host": "${apiman.es.host}",
       "port": "${apiman.es.port}"
       // <metrics configuration>
     }
   }
}
apiman-gateway.metrics=io.apiman.gateway.engine.es.ESMetrics
Table 2. Available implementations:
Implementation Notes

io.apiman.gateway.engine.es.ESMetrics

Batching ES metrics

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

Shared State

Set shared state implementation as shown.

"components": {
  // Shared State Component Settings
  "ISharedStateComponent": {
    "class": "io.apiman.gateway.engine.es.ESSharedStateComponent",
    "config": {
      "client": {
        "type": "jest",
        "protocol": "${apiman.es.protocol}",
        "host": "${apiman.es.host}",
        "port": "${apiman.es.port}"
        //<configuration options>
      }
    }
  }
}
apiman-gateway.components.ISharedStateComponent=io.apiman.gateway.engine.es.ESSharedStateComponent
apiman-gateway.components.ISharedStateComponent.client.type=jest
# <configuration options>

Required Parameters

Rate Limiter

Set rate limiter implementation as shown.

"components": {
  // Rate Limiter Component Settings
  "IRateLimiterComponent": {
    "class": "io.apiman.gateway.engine.es.ESRateLimiterComponent",
    "config": {
      "client": {
        "type": "jest",
        "protocol": "${apiman.es.protocol}",
        "host": "${apiman.es.host}",
        "port": "${apiman.es.port}"
        // <configuration options>
      }
    }
  }
}
apiman-gateway.components.IRateLimiterComponent=io.apiman.gateway.engine.es.ESRateLimiterComponent
apiman-gateway.components.IRateLimiterComponent.client.type=jest
# <configuration options>

Required Parameters

Cache Store

Set cache store implementation as shown.

"components": {
  // Cache Store Component Settings
  "ICacheStoreComponent": {
    "class": "io.apiman.gateway.engine.es.ESCacheStoreComponent",
    "config": {
      "client": {
        "type": "jest",
        "protocol": "${apiman.es.protocol}",
        "host": "${apiman.es.host}",
        "port": "${apiman.es.port}"
        // <configuration options>
      }
    }
  }
}
apiman-gateway.components.IRateLimiterComponent=io.apiman.gateway.engine.es.ESRateLimiterComponent
apiman-gateway.components.IRateLimiterComponent.client.type=jest
# <configuration options>

Required Parameters

results matching ""

    No results matching ""