scredis / scredis

Non-blocking, ultra-fast Scala Redis client built on top of Akka IO.

Home Page:https://scredis.github.io/scredis/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Client performance issues

amerpersonal opened this issue · comments

Hi.

I tried to use scredis to read the value from Redis. Its a long string (array of jsons in string format) from remote machine. Code is running on my local computer.

redis.get[String](s"terminal_symbol_data_${terminalId}")

However, when I time it, it says it needs 526 ms:

val s = System.currentTimeMillis()

    redis.get[String](s"terminal_symbol_data_${terminalId}")(137552).onComplete {
      case Success(r) => logger.info(s"got redis symbols async in ${System.currentTimeMillis() - s} ms: ${r}")
      case Failure(ex) => logger.error("Failure on getting Redis symbols")
    }

When I try to use node.js client for reading same key from the same host, it takes only around 30 ms.
I also tried one another Scala client and it takes event more than scredis.

Do you know what can be an issue?
Also, using another client, it needs even 3-4 seconds to get this same key when running on DEV environment. How much scredis can slow down when request frequency increases?

Thanks in advance,

Amer

Hi,

could you try with latest Redis version?
Could you describe what is a configuration of Redis?
Are you using default configuration?

Also initial requests can take longer, do you see this 526ms as average time across a longer period of time or just a first request?

Scredis scales pretty well, even with high throughput you should not notice significant delays in processing time of redis requests. You might need to tweak a little configuration if you hit issues but nothing that could not be worked out fast.

closing due to inactivity, if you have more information and this issue still occurs please create a new ticket with more details.