HUB
Sign inSign up

featurehub/dacha2

By featurehub

•Updated 4 months ago

FeatureHub Dacha2: lazy, CloudEvents-based feature cache for Edge

Image
0

10K+

featurehub/dacha2 repository overview

⁠FeatureHub Dacha2 (Cache)

Dacha2 is FeatureHub's lazy feature cache and the recommended cache since 1.5.9. It sits between the Management Repository (MR) and Edge. It holds the environments, service accounts, features and pre-calculated etags that Edge needs to answer SDK requests, so SDK traffic never reaches MR or the database.

  • Lazy loading: the first time it sees an environment/API key, it asks MR for the data, then keeps it up to date from the event stream.
  • Caches misses too: repeated requests for unknown keys never reach MR.
  • CloudEvents based: works with NATS, Kafka or Google Pub/Sub.

See Architecture – Dacha⁠.

Dacha2 is used in the scalable streaming deployment (Option 2a⁠) together with mr⁠ and edge⁠. Dacha2 should not be exposed outside your network; only Edge needs to reach it.

Full documentation: https://docs.featurehub.io⁠

⁠Running

docker run --user 999:999 \
  -e management-repository.url=http://mr:8085 \
  -e nats.urls=nats://nats:4222 \
  featurehub/dacha2:latest

MR must run with dacha1.enabled=false and dacha2.enabled=true. Edge needs dacha.url.default pointed at this service. See Async options⁠.

⁠Ports

PortPurpose
8902Dacha2 API used by Edge (server.port)
8279Prometheus metrics and health checks (monitor.port)

⁠Configuration

You can set any configuration property as an environment variable with the same name and case. You can also mount /etc/app-config/application.properties and /etc/app-config/secrets.properties. See Run configuration⁠.

PropertyDescription
management-repository.urlURL of MR, including the port. Dacha2 uses it to fill cache misses.
dacha2.cache.api-keyKey sent to MR when MR protects its Dacha2 endpoint with mr.dacha2.api-keys. Use it when Dacha2 runs in a different cluster from MR.
dacha2.streaming.disconnect-behaviourWhat to do when the streaming layer disconnects: on-reconnect (default), use-passthrough or standard.
nats.urlsNATS servers. For Kafka or Google Pub/Sub, see Async options⁠.

These and further options are described in Dacha2 Config⁠.

⁠Health and metrics

⁠More information

License: Apache 2 with Commons Clause.

Tag summary

Content type

Image

Digest

sha256:aa4d37a70…

Size

191.7 MB

Last updated

4 months ago

docker pull featurehub/dacha2