Using a Redis cluster as a storage engine for Besu enables to specify multiple types of Besu nodes depending on the features. This approach would allow us to have optimized nodes for query the database. RocksDB's lock mechanism makes harder to have multiple instances of Besu accessing the same database. Redis on the other hand enables this use case, we can imagine a categorisation of Besu nodes like the following:
- besu-tx: Handling of local transaction pool.
- besu-sync: Handling of blockchain synchronisation through Ethereum P2P network.
- besu-query: Handling of database queries.
Using docker compose:
docker-compose -f ./docker/redis.yml up -d
Redis + Web UI
docker-compose -f ./docker/redis.yml -f ./docker/redis-ui.yml up -d
Go to http://127.0.0.1:8081
Remove Redis volume:
docker volume rm -f docker_redis_data
./gradlew assemble
./besu.sh --key-value-storage=redis-storage --plugin-redis-storage-host=localhost --plugin-redis-storage-port=6379