-
Notifications
You must be signed in to change notification settings - Fork 945
Connection Internals
Connections and netty connection events in Lettuce are handled by a chain of channel handlers.
-
Channel Initializer
-
SSL Handler (for SSL connections)
-
Channel Activator
-
Connection Watchdog (Reconnect)
-
Channel Group Listener (register channels in a channel group)
-
Command Handler (buffering commands/reply state machine/encode commands to channel)
-
Connection (command trigger, external command control by Lettuce users)
Connecting to Lettuce has four phases:
-
Not connected
-
Connected to channel (usually triggered by
connect()
, the TCP channel is open) -
Connection initialized (e. g. SSL Handshake done or
channelActive()
on plain connections) -
Ready to use (
login
/select
commands will be issued and connection returns on success)
The same flow applies on reconnect.
Each allocated connection pre-allocates a buffer of 65kb for response processing.
This wiki and the README document contains a lot of information, please take your time and read these instructions carefully.
If you run into any trouble, you may start with getting started.
We provide detailed changes for each Lettuce release.
Be sure to read the CONTRIBUTING guidelines before reporting a new Lettuce issue or open a pull request.
If you have any questions about the Lettuce usage or want to share some information with the community, please go to one of the following places:
- GitHub Discussions
- for chatting
More resources:
- Javadoc
- Build status: Travis CI
- All versions: Maven Central
- Snapshots: Sonatype OSS Repository
Intro
Getting started
- Getting started
- Redis URI and connection details
- Basic usage
- Asynchronous API
- Reactive API
- Publish/Subscribe
- Transactions/Multi
- Scripting and Functions
- Redis Command Interfaces
- FAQ
HA and Sharding
Advanced usage
- Configuring Client resources
- Client Options
- Dynamic Command Interfaces
- SSL Connections
- Native Transports
- Unix Domain Sockets
- Streaming API
- Events
- Command Latency Metrics
- Tracing
- Stateful Connections
- Pipelining/Flushing
- Connection Pooling
- Graal Native Image
- Custom commands
Integration and Extension
Internals