Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7747657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:35:00+00:00 2026-06-01T10:35:00+00:00

If redis gets overloaded, can I configure it to drop set requests? I have

  • 0

If redis gets overloaded, can I configure it to drop set requests? I have an application where data is updated in real time (10-15 times a second per item) for a large number of items. The values are outdated quickly and I don’t need any kind of consistency.

I would also like to compute parallel sum of the values that are written in real time. What’s the best option here? LUA executed in redis? Small app located on the same box as redis using UNIX sockets?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T10:35:02+00:00Added an answer on June 1, 2026 at 10:35 am

    When Redis gets overloaded it will just slow down its clients. For most commands, the protocol itself is synchronous.

    Redis supports pipelining though, but there is no way a client can cancel the traffic still in the pipeline, but not yet acknowledged by the server. Redis itself does not really queue the incoming traffic, the TCP stack does it.

    So it is not possible to configure the Redis server to drop set requests. However, it is possible to implement a last value queue on client side:

    • the queue is actually a represented by 2 maps indexed by your items (only one value stored per item). The primary map will be used by the application. The secondary map will be used by a specific thread. The 2 maps content can be swapped in an atomic way.

    • a specific thread is blocking when the primary map is empty. When it is not, it swaps the content of the two maps, sends the content of the secondary map asynchronously to Redis using aggressive pipelining and variadic parameters commands. It also receives ack from Redis.

    • while the thread is working with the secondary map, the application can still fill the primary map. If Redis is too slow, the application will only accumulate last values in the primary map.

    This strategy could be implemented in C with hiredis and the event loop of your choice.

    However, it is not trivial to implement, so I would first check if the performance of Redis against all the traffic is not enough for my purpose. It is not uncommon to benchmark Redis at more than 500K op/s these days (using a single core). Nothing prevents you to shard your data on multiple Redis instances if needed.

    You will likely saturate the network links before the CPU of the Redis server. That’s why it is better to implement the last value queue (if needed) on client side rather than server side.

    Regarding the sum computation, I would try to calculate and maintain it in real time. For instance, the GETSET command can be used to set a new value while returning the previous one.

    Instead of just setting your values, you could do:

    [old value] = GETSET item <new value>
    INCRBY mysum [new value] - [old value]
    

    The mysum key will contain the sum of your values for all the items at any time. With Redis 2.6, you can use Lua to encaspulate this calculation to save roundtrips.

    Running a big batch to calculate statistics on existing data (this is how I understand your “parallel” sum) is not really suitable for Redis. It is not designed for map/reduce like computation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I configure Redis slave to stop saving dumps? I have omitted all save
Using redis-rb, how can I push a hash into a list? Do I have
I want to use redis for my game's leaderboard data and I have seen
I have a node.js application using Express and Redis. My question is how do
Redis 2.0.3 In my Redis DB I have a set of items. Each item
I have a Redis Master node which will be populated by a master application.
Suppose you have a LIST datatype in Redis. How do you delete all its
I have substitute my memcache with Redis. I use the phpredis client and the
Suppose I do this in redis at 13:30 20 Feb 2020 , > set
I just NuGetted ServiceStack.Redis 3.1.3 but as its dependencies it also gets ServiceStack.Common and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.