Environment Variable | Type | Default | Description |
---|---|---|---|
AWS_REGION | String* | The AWS region of the SQS queue | |
QUEUE_URL | String* | The URL of the queue to consume from | |
SERVER_API_KEY | String* | Environment’s Server API key | |
AWS_ACCESS_KEY_ID | String* | AWS access key ID provided by Stigg | |
AWS_SECRET_ACCESS_KEY | String* | AWS secret access key provided by Stigg | |
ENVIRONMENT_PREFIX | String | production | The Identifier of the environment needs to be the same as the one used by the SDK |
REDIS_HOST | String | ” | Redis host address |
REDIS_PORT | Number | 6379 | Redis port |
REDIS_DB | Number | 0 | Redis DB identifier |
REDIS_USER | String | (Optional) Redis username | |
REDIS_PASSWORD | String | (Optional) Redis password | |
REDIS_TLS | Boolean | 0 | (Optional) Redis use TLS encryption |
BATCH_SIZE | Number | 1 | Number of messages to receive in a single batch |
KEYS_TTL_IN_SECS | Number | 604,800 (7 days) | The duration in milliseconds that data will be kept in the cache before evicted |
EDGE_API_URL | String | https://edge.api.stigg.io | Edge API address URL |
SENTRY_DSN | String | Loaded from remote | Sentry DSN used for internal error reporting |
DISABLE_SENTRY | Boolean | 0 | Disables reporting internal errors to Sentry |
PORT | Number | 4000 | HTTP server port |
GET /livez
200
if the service is alive.
Healthy response: {"status":"UP"}
GET /readyz
200
if the service is ready to receive messages.
Healthy response: { "status": "UP", "consumers": 10, "redis": "CONNECTED" }
Unhealthy response: { "status": "DOWN", "consumers": 0, "redis": "DISCONNECTED" }
GET /metrics
Metric Name | Type | Description |
---|---|---|
persistent_cache_write_duration_seconds | histogram | Time taken to write to Redis cache |
persistent_cache_write_errors_total | counter | Number of failed Redis cache write operations |
persistent_cache_hit_ratio | gauge | Percentage of Redis cache hits vs total cache queries |
persistent_cache_memory_usage_bytes | gauge | Amount of memory used by the Redis cache in bytes |
persistent_cache_hits_total | gauge | Total number of cache hits in Redis |
persistent_cache_misses_total | gauge | Total number of cache misses in Redis |
persistent_cache_message_handling_duration_seconds | histogram | Time taken to process a message from receipt to completion |
persistent_cache_messages_processed_total | counter | Total number of messages processed |
redis
config during initialization:
persistent-cache-service
are configured to use the same Redis instance, DB number, and the same environment prefix.persistent-cache-service
runs efficiently with the following configuration: