File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,18 @@ The service is configured via environment variables:
160160| ` BATCH_LIMIT ` | Maximum number of commitments to process per batch | ` 1000 ` |
161161| ` ROUND_DURATION ` | Duration between block creation rounds | ` 1s ` |
162162
163+ ### Storage Configuration
164+ | Variable | Description | Default |
165+ | ----------| -------------| ---------|
166+ | ` USE_REDIS_FOR_COMMITMENTS ` | Use Redis for commitment queue (instead of MongoDB) | ` false ` |
167+ | ` REDIS_HOST ` | Redis server hostname | ` localhost ` |
168+ | ` REDIS_PORT ` | Redis server port | ` 6379 ` |
169+ | ` REDIS_PASSWORD ` | Redis server password | `` |
170+ | ` REDIS_DB ` | Redis database number | ` 0 ` |
171+ | ` REDIS_STREAM_NAME ` | Redis stream name for commitments (allows multiple shards to share a Redis instance) | ` commitments ` |
172+ | ` REDIS_FLUSH_INTERVAL ` | Interval for flushing pending commitments to Redis | ` 50ms ` |
173+ | ` REDIS_MAX_BATCH_SIZE ` | Maximum batch size before forcing flush | ` 2000 ` |
174+
163175## API Endpoints
164176
165177### JSON-RPC 2.0 Methods
Original file line number Diff line number Diff line change @@ -295,7 +295,7 @@ services:
295295 MONGODB_URI : " mongodb://mongodb-shard1-1:27017,mongodb-shard1-2:27017,mongodb-shard1-3:27017/aggregator?replicaSet=rs1"
296296 PORT : " 3000"
297297 HOST : " 0.0.0.0"
298- CONCURRENCY_LIMIT : " 1000 "
298+ CONCURRENCY_LIMIT : " 5000 "
299299 ENABLE_DOCS : " true"
300300 ENABLE_CORS : " true"
301301 MONGODB_DATABASE : " aggregator"
@@ -321,6 +321,7 @@ services:
321321 REDIS_POOL_SIZE : " 100"
322322 REDIS_MIN_IDLE_CONNS : " 10"
323323 USE_REDIS_FOR_COMMITMENTS : " true"
324+ REDIS_STREAM_NAME : " commitments:shard:1"
324325 REDIS_FLUSH_INTERVAL : " 50ms"
325326 REDIS_MAX_BATCH_SIZE : " 2000"
326327
@@ -377,6 +378,7 @@ services:
377378 environment :
378379 << : *environment-base
379380 MONGODB_URI : " mongodb://mongodb-shard2-1:27017,mongodb-shard2-2:27017,mongodb-shard2-3:27017/aggregator?replicaSet=rs2"
381+ REDIS_STREAM_NAME : " commitments:shard:2"
380382 SHARDING_MODE : " child"
381383 SHARDING_CHILD_SHARD_ID : 2 # 0b10
382384 depends_on :
@@ -391,6 +393,7 @@ services:
391393 environment :
392394 << : *environment-base
393395 MONGODB_URI : " mongodb://mongodb-shard2-1:27017,mongodb-shard2-2:27017,mongodb-shard2-3:27017/aggregator?replicaSet=rs2"
396+ REDIS_STREAM_NAME : " commitments:shard:2"
394397 SHARDING_MODE : " child"
395398 SHARDING_CHILD_SHARD_ID : 2 # 0b10
396399 depends_on :
You can’t perform that action at this time.
0 commit comments