HUB
Sign inSign up

featurehub/edge-rest

By featurehub

•Updated 4 months ago

FeatureHub Edge-REST: database-backed GET/PUT SDK feature API

Image
0

10K+

featurehub/edge-rest repository overview

⁠FeatureHub Edge-REST

Edge-REST is a REST-only version of the FeatureHub SDK-facing server. It supports:

  • GET: SDKs poll for feature state
  • PUT: service accounts with write permission can change features (for example during automated tests)

It has no streaming (SSE) support. It reads directly from the database, so it needs no NATS and no Dacha cache. Because its traffic is almost all reads, it works well against one or more read replicas. See Architecture – Edge (REST only)⁠.

Edge-REST is deployed alongside mr⁠ in Option 2b – Scalable Deployment (REST only)⁠. It is also bundled inside party-server-ish⁠.

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

⁠Running

docker run -p 8553:8553 --user 999:999 \
  -e db.url=jdbc:postgresql://db:5432/featurehub -e db.username=featurehub -e db.password=secret \
  -e db-replica.url=jdbc:postgresql://db-replica:5432/featurehub -e db-replica.username=featurehub -e db-replica.password=secret \
  featurehub/edge-rest:latest

A Docker Compose example is in docker-compose-options/mr-edge-rest-postgres in featurehub-install⁠.

⁠Ports

PortPurpose
8553Edge REST API (server.port)
8701Prometheus 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
db.url, db.username, db.password, db.minConnections, db.maxConnectionsPrimary database connection. See Database configuration⁠.
db-replica.url, db-replica.username, db-replica.passwordRead replica used for GET requests. See Database Read Replicas⁠.
jersey.cors.headersCORS headers allowed for browser SDKs.
edge.cache-control.headerOverride Cache-Control on GET (polling) responses to limit how often clients poll.

See Edge (all) Config⁠ and Edge (REST only) Config⁠.

⁠Health and metrics

⁠More information

License: Apache 2 with Commons Clause.

Tag summary

Content type

Image

Digest

sha256:a56ea1a4a…

Size

135.7 MB

Last updated

4 months ago

docker pull featurehub/edge-rest