<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/github---nicolasva-solid-resp-ractor-jwepktv8t" -->

---
title: GitHub - nicolasva/solid-resp-ractor | daily.dev
description: Solid RESP Ractor is a dependency-free RESP2/RESP3 codec for Ruby that decouples protocol parsing from Redis client behavior, offering extension points for...
canonical: https://daily.dev/posts/github---nicolasva-solid-resp-ractor-jwepktv8t
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: GitHub - nicolasva/solid-resp-ractor | daily.dev
og:description: Solid RESP Ractor is a dependency-free RESP2/RESP3 codec for Ruby that decouples protocol parsing from Redis client behavior, offering extension points for...
og:url: https://daily.dev/posts/github---nicolasva-solid-resp-ractor-jwepktv8t
og:image: https://api.daily.dev/og/posts/jwEPktV8t.png
og:image:alt: GitHub - nicolasva/solid-resp-ractor
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub - nicolasva/solid-resp-ractor

**[Ruby Flow](https://daily.dev/sources/rubyflow)** · 9 min read · 0 upvotes · 0 comments

## Summary

Solid RESP Ractor is a dependency-free RESP2/RESP3 codec for Ruby that decouples protocol parsing from Redis client behavior, offering extension points for transports, event loops, error handling, and value representation. It has no global mutable state, allowing immutable encoder instances to be shared across Ractors while readers stay local to their owning Ractor. The gem includes configurable resource limits, custom error mapping, typed RESP3 value handling, and a detailed benchmark suite comparing encoding and reading throughput, allocation, and scaling efficiency across 1-8 Ractors on Ruby 4.0.1 with Redis 8.10.0.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://github.com/nicolasva/solid-resp-ractor>

## Questions this post answers

### How much does reusing the destination string in read_nonblock reduce memory allocation for a Redis GET command in Ruby?

Reusing the destination String passed to read_nonblock cut GET allocation from 16,609.8 to 120.8 bytes per operation, a 99.27% reduction, and reduced object allocations from 6.0 to 4.0 per op. Throughput changed by -0.68% with a single Ractor but improved 8.18% at 8 Ractors, while pipeline allocation fell 74.59% with throughput improving 2.23% at 8 Ractors.

_Developers tuning Redis client allocation hotspots can find similar optimization patterns on daily.dev._

### Can encoder and reader objects be shared safely between Ruby Ractors for Redis communication?

Yes, immutable encoder instances can be shared between Ractors, while readers must remain local to the Ractor that owns their IO. The default encoder and codec are Ractor-shareable, but decoded responses are not automatically shareable since mutable strings, arrays, and hashes within them are not deeply frozen, requiring explicit Ractor.make_shareable transformation.

_Teams building concurrent Ruby services around Ractors can track these patterns on daily.dev._

## Similar posts on daily.dev

- [GitHub - nicolasva/solid-redis](https://daily.dev/posts/github---nicolasva-solid-redis-oosnxofle) · Ruby Flow · 0 upvotes · 0 comments
- [GitHub - nicolasva/solid-jobs](https://daily.dev/posts/github---nicolasva-solid-jobs-3psnafm9f) · Ruby Flow · 0 upvotes · 0 comments
- [Issue \#814: Bringing Rails into the Ractor age — Ruby Weekly](https://daily.dev/posts/issue-814-bringing-rails-into-the-ractor-age-ruby-weekly-vch5zguhp) · Ruby Weekly · 0 upvotes · 0 comments
- [Ractors: Real Parallelism in Ruby Without the GVL](https://daily.dev/posts/ractors-real-parallelism-in-ruby-without-the-gvl-hmgki5ufp) · RUBYLAND · 0 upvotes · 0 comments
- [RFC 9110 Accept headers, dotenv fixes, and Ractor safety](https://daily.dev/posts/rfc-9110-accept-headers-dotenv-fixes-and-ractor-safety-fcju6cnjp) · This Week in Rails · 0 upvotes · 0 comments

---

Tags: [#performance](https://daily.dev/tags/performance), [#ruby](https://daily.dev/tags/ruby), [#redis](https://daily.dev/tags/redis)

[View this post on daily.dev](https://daily.dev/posts/github---nicolasva-solid-resp-ractor-jwepktv8t)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"GitHub - nicolasva/solid-resp-ractor","url":"https://daily.dev/posts/github---nicolasva-solid-resp-ractor-jwepktv8t","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/github---nicolasva-solid-resp-ractor-jwepktv8t"},"datePublished":"2026-10-02T13:57:39.440Z","dateModified":"2026-10-02T13:57:59.375Z","description":"Solid RESP Ractor is a dependency-free RESP2/RESP3 codec for Ruby that decouples protocol parsing from Redis client behavior, offering extension points for...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"Ruby Flow","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Ruby Flow","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/a21aaa8bcbbf448193a016895c90a0e1","url":"https://daily.dev/sources/rubyflow"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/github---nicolasva-solid-resp-ractor-jwepktv8t","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"performance,ruby,redis","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Ruby Flow","item":"https://daily.dev/sources/rubyflow"},{"@type":"ListItem","position":3,"name":"GitHub - nicolasva/solid-resp-ractor"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/github---nicolasva-solid-resp-ractor-jwepktv8t#faq","mainEntity":[{"@type":"Question","name":"How much does reusing the destination string in read_nonblock reduce memory allocation for a Redis GET command in Ruby?","acceptedAnswer":{"@type":"Answer","text":"Reusing the destination String passed to read_nonblock cut GET allocation from 16,609.8 to 120.8 bytes per operation, a 99.27% reduction, and reduced object allocations from 6.0 to 4.0 per op. Throughput changed by -0.68% with a single Ractor but improved 8.18% at 8 Ractors, while pipeline allocation fell 74.59% with throughput improving 2.23% at 8 Ractors. Developers tuning Redis client allocation hotspots can find similar optimization patterns on daily.dev."}},{"@type":"Question","name":"Can encoder and reader objects be shared safely between Ruby Ractors for Redis communication?","acceptedAnswer":{"@type":"Answer","text":"Yes, immutable encoder instances can be shared between Ractors, while readers must remain local to the Ractor that owns their IO. The default encoder and codec are Ractor-shareable, but decoded responses are not automatically shareable since mutable strings, arrays, and hashes within them are not deeply frozen, requiring explicit Ractor.make_shareable transformation. Teams building concurrent Ruby services around Ractors can track these patterns on daily.dev."}}]}
```

