Skip to content

Tutorial: Perfect Failure Detector

Zhenyu Guo edited this page Jun 1, 2015 · 5 revisions

Code is here

Detailed tutorial coming later~

This tutorial is to demonstrate how rDSN helps develop and debug a system with progressively added system complexity.

  1. Single thread versus multiple thread

You can setup thread worker count for each thread pool specifically, usually from 1 to avoid concurrency complexities and bugs initially. Note some of the thread pools may not function correctly when your service uses blocking calls (e.g., task::wait) in the code. In that case, worker count cannot be 1.

[threadpool.default]
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
worker_count = 1
  1. Deterministic execution versus non-deterministic execution

A deterministic execution help repeat the same buggy scenario again and again until the whole flow is fixed.

[core]
tool = simulator

[tools.simulator]
random_seed = 810804960
use_given_random_seed = true
  1. Non-fault environment versus Fault environment (disk, network)

  2. Standalone server versus shared server (resource interference)

  3. Automated exploration of the combinations above