Comments (7)
No the client is always connected to the server.
If you use a pool you can dispatch the connexion on many redis server, (or put the same server multiple times in the Seq of redis servers).
If you only have one server, and don't need many connexion then you can use a RedisClient.
from rediscala.
Thanks for your prompt and helpful replies. I wasn't aware that the connection is keep-alived. Is there any advantage to putting the same server multiple times in the Seq of redis servers? Will that round robin the request to different connections to the same server (essentially using a connection pool)?
BTW, do you mind pointing me to the code where it's specified as a keep-alive connection?
from rediscala.
Yes it will round robin the connections. if your CPU is not already overloaded with just one you can add more for more throughput
from rediscala.
Thanks for posting these questions & answers :- ) It wasn't clear to me when & why to use the connection pool, and when not to — so I searched all GitHub issues for "connection" and then I found this topic.
I think it'd make sense to rewrite & include the stuff in this topic in the main readme.
(Some stuff from this topic: #22 about how to avoid bad performance when writing async requests, could also be in the main docs perhaps)
from rediscala.
Any redis clients will try to reconnect to the server every 2s if the connection is lost.
from rediscala.
The client opens a connection per request, right? Is there any way to have it open a few connections that serve all the request, and keep the connections persistent?
from rediscala.
Thanks. Just to confirm, the connections are set as keep-alive=true by default?
from rediscala.
Related Issues (20)
- can update akka 2.5.10+? HOT 2
- stop() not part of a trait
- Question: How to distinguish between operation failures
- Timeouts for RedisClientPool
- rediscala endless retry loop when connection fails
- Redis streams support? HOT 1
- This is a mistaken issue..deleted.
- UnsupportedClassVersionError HOT 8
- Redis Protocol error: Got 43 as initial reply byte
- Please make a patch release, with fixes for RedisCluster
- Smembers is set as isMasterOnly = true HOT 1
- [Question] why sentinel not support sentinel auth?
- [Question] Should RedisClientPool extend Transactions?
- [Question] Use SSL to Authenticate
- creating a RedisClient from a typed akka behavior
- [Question] Akka Dispatch error when using rediscala.
- How we can do health check for redis cluster using `redisscala`?
- Null pointer exception at redis.RedisCluster.$anonfun$onConnectStatus$1
- A new connection is getting created every time
- Support for pekko HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rediscala.