Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion contrib/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,16 @@ OK

## Step 3

Continue being great and build your app with the power of DragonflyDB!
Continue being great and build your app with the power of DragonflyDB!

## Tuning Dragonfly DB
If you are attempting to tune Dragonfly DB for performance, consider `NAT` performance costs associated with containerization.
> ## Performance Tuning
> ---
> In `docker-compose`, there is a meaningful difference between an `overlay` network(which relies on docker `NAT` traversal on every request) and using the `host` network(see [`docker-compose.yml`](https://github.com/dragonflydb/dragonfly/blob/main/contrib/docker/docker-compose.yml)).
>  
> Fore more information, see the [official docker-compose network_mode Docs](https://docs.docker.com/compose/compose-file/compose-file-v3/#network_mode)
>  

### More Build Options
- [Docker Quick Start](/docs/quick-start/)
Expand Down
4 changes: 4 additions & 0 deletions contrib/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ services:
memlock: -1
ports:
- "6379:6379"
# For better performance, consider `host` mode instead `port` to avoid docker NAT.
# `host` mode is NOT currently supported in Swarm Mode.
# https://docs.docker.com/compose/compose-file/compose-file-v3/#network_mode
# network_mode: "host"
volumes:
- dragonflydata:/data
volumes:
Expand Down