tulip / oplogtoredis

Publish MongoDB oplog entries to Redis
Apache License 2.0
38 stars 9 forks source link

OplogToRedis: Persistent Denylist #79

Closed alex-goodisman closed 4 months ago

alex-goodisman commented 4 months ago

Persist the configurable denylist across a restart.

The service takes an optional environment variable configuration option OTR_PG_PERSISTENCE_URL to a postgres database. The service will create a table otr_denylist with one column (a list of unique denylist entries). The service will write to the table whenever entries are created or removed. Since all OTR replicas should have the same denylist, this should be fine- first to add adds, and first to delete deletes.

The service will read the table contents at startup to populate the initial denylist. This should make the service resilient to restarting after a denylist entry was added. The HTTP methods should only respond 2xx after writing to the DB, so persistence failures will be known by the calling context.