Redis Fault Injection
@LafiKL
$ whoami
■ Lead Systems Research Engineer at Misk Innovation
■ Experienced in building distributed systems and high
scalability
■ Twitter: @LafiKL
■ Github: @LafiKL
Story Time
Based on true events
Idempotent functions
f(f(x)) = f(x)
Why Redis In particular?
Redis is a swiss-army knife, used in many scenarios such as:
■ K/V Cache
■ Rate Limiting
■ Queue
■ Geo DB
■ Session Storage
■ External Shared State
■ Notifications
■ ...and the list goes on
Fault Injection Testing
In software testing, fault injection is a technique for improving the coverage of a
test by introducing faults to test code paths, in particular error handling code
paths, that might otherwise rarely be followed.
From Wikipedia
Features:
• Provides command level rule selection
• Acts as a proxy, so it's transparent to users, and clients
don't need to change anything
• It ships as a single binary. No dependencies.
• CLI & HTTP API to control the attack plan.
Client
SET key value
Client connects to RedFI
transparently
SET key value
Checks the rules against the
command sequentially
RedFI
Redis is oblivious to what RedFI is
doing
Redis
Example Use Cases:
• Race conditions testing
• Handling network Latency
• Handling dropped/flaky connections
• Slow consumers (When used a jobs store)
Demo Time!
Future Plans:
• Integrate similar fault injection knobs into Envoy
• Shift focus on building the replay and regression detection
systems
Thank You

RedisConf18 - Redis Fault Injection

  • 1.
  • 2.
    $ whoami ■ LeadSystems Research Engineer at Misk Innovation ■ Experienced in building distributed systems and high scalability ■ Twitter: @LafiKL ■ Github: @LafiKL
  • 3.
  • 5.
  • 6.
    Why Redis Inparticular? Redis is a swiss-army knife, used in many scenarios such as: ■ K/V Cache ■ Rate Limiting ■ Queue ■ Geo DB ■ Session Storage ■ External Shared State ■ Notifications ■ ...and the list goes on
  • 7.
    Fault Injection Testing Insoftware testing, fault injection is a technique for improving the coverage of a test by introducing faults to test code paths, in particular error handling code paths, that might otherwise rarely be followed. From Wikipedia
  • 9.
    Features: • Provides commandlevel rule selection • Acts as a proxy, so it's transparent to users, and clients don't need to change anything • It ships as a single binary. No dependencies. • CLI & HTTP API to control the attack plan.
  • 10.
    Client SET key value Clientconnects to RedFI transparently SET key value Checks the rules against the command sequentially RedFI Redis is oblivious to what RedFI is doing Redis
  • 11.
    Example Use Cases: •Race conditions testing • Handling network Latency • Handling dropped/flaky connections • Slow consumers (When used a jobs store)
  • 12.
  • 13.
    Future Plans: • Integratesimilar fault injection knobs into Envoy • Shift focus on building the replay and regression detection systems
  • 14.