Coder Social home page Coder Social logo

valkeyri's Introduction

valkeyri

Provide an in-kernel cache for valkey or redis

Constraints

  • It only runs on Linux that supports the XDP feature.
  • The Redis client must use a connection pool. I wrote the logic under the condition that the connection is maintained, as there is overhead for all processing of the TCP state.
  • Currently, it sends a 41 response for all get requests. This will be modified as the cache strategy is implemented.

Performance

Environment

Redis was run using Docker as follows: docker run --name redis -d -p 6379:6379 redis

The Redis client used in the test is redis-rs, and the connection pool was implemented using r2d2. When the client runs, it establishes 300 connections with Redis.

Benchmark

without valkeyri

Statistics         Avg          Stdev          Max
  Reqs/sec        654.40        25.54         694.00
  Latency        75.63ms       27.97ms       197.37ms
  Latency Distribution
     50%     53.13ms
     75%     63.62ms
     90%     70.10ms
     99%     74.81ms
  HTTP codes:
    1XX - 0, 2XX - 3321, 3XX - 0, 4XX - 0, 5XX - 0
    others - 0
  Throughput:     661.08/s

with valkeyri (SKB mode)

just run-release

Statistics         Avg          Stdev          Max
  Reqs/sec       9079.80        227.76       9318.00
  Latency         5.50ms        1.78ms       23.15ms
  Latency Distribution
     50%      4.21ms
     75%      4.71ms
     90%      5.08ms
     99%      5.42ms
  HTTP codes:
    1XX - 0, 2XX - 45408, 3XX - 0, 4XX - 0, 5XX - 0
    others - 0
  Throughput:    9093.90/s

Even without XDP native mode, you can confirm that there is more than a 10x performance improvement.

valkeyri's People

Contributors

wqld avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.