~/talk

Whoops! I Rewrote It in Rust

Talkat RustConf 2021 · 2021-09-14..09-15· [rust]
slides:none on file

Three engineers incrementally add Rust to Pelikan, producing a Twimcache prototype and then a segcache rewrite that aims to replace Memcached/Redis forks. Early Rust server using tokio and a C storage layer shows 10–15% throughput loss and 25–30% higher p39 latency, prompting a mio-based ping server and a storage rewrite. Final segcache uses BoringSSL and tokio and benchmarking with cargo bench and cargo fuzz and matches or beats single-threaded memcache but still trails in multi-threaded runs.

AI-written summary · about

  1. 0:00Intro
  2. 2:05Use Rust to: . ack Transport Layer Security (TLS) • match performance of implementation
  3. 2:45Rust Storage in Pelikan: 2018 Engineer wants to add storage to Pelikan and write the library in Rust . Used the framework with FFI to use Rust Storage First commit of Rust to Pelikan!
  4. 3:12Rust Server in Pelikan: 2019 Engineer wants to use Rust for server code
  5. 3:47Performance Testing Apply synthetic workloads with ratelimit to measure latency at a specific request rate
  6. 6:36Performance Problems Throughput 10-15% slower
  7. 10:48Prototype • Memcached protocol compatible • wrapped std::collections:: HashMapas temporary storage benchmarking looked good • next step: FFI for storage library
  8. 15:53Rewrite Benefits new storage design • added new ideas to storage library helped make it more production ready
  9. 17:15'empowering everyone to build reliable and efficient software • high performance • code with confidence in reliability awesome language features and tools zero cost abstraction
  10. 19:10microbenchmarking of critical components cargo fuzz easy to add fuzz testing for protocol library
  11. 22:42Next Steps Path to Production • feature complete . more testing • production canary • deployment
  12. 25:03Rewriting has costs and benefits Costs • Extra time would have • Easier to work with an all caused missed deadlines Rust codebase Duplicating work that's • No more cmake!!! been paid for
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.