Skip to content

Add cookbook variants for Try Valkey (caching, rate limiting, leaderboards, queues) #527

@cnuthalapati

Description

@cnuthalapati

Context

We'd like to contribute a set of focused tutorial pages for the Try Valkey emulator. Our team has several PMs who want to submit PRs for these. This builds on #526 (tutorial panel mechanism).

Problem

The current Try Valkey page is general-purpose but doesn't help users learn specific patterns. Developers typically come to Valkey for a concrete use case (caching, rate limiting, leaderboards, queues) and want to see those patterns in action immediately.

Proposal

Create separate cookbook pages under /try-valkey/ that each focus on one use case, using the same emulator but with a tailored tutorial panel:

  • Caching patterns - cache-aside with SET EX, conditional SET NX, TTL management, key naming conventions
  • Rate limiting - INCR + EXPIRE fixed window, sorted set sliding window, token bucket with Lua
  • Leaderboards - ZADD, ZRANK, ZINCRBY, ZREVRANGE top-N, time-bucketed scores
  • Queues - LPUSH/BRPOP simple queue, XADD/XREAD/XGROUP consumer group streams

Each cookbook is a new markdown file (e.g., content/try-valkey/caching.md) that references the same VM state but provides its own set of example commands for the tutorial panel.

Implementation per cookbook

  • One new markdown file in content/try-valkey/
  • Front matter defines the cookbook-specific commands and descriptions
  • Same emulator, same template, different panel content
  • Each page is self-contained: intro paragraph + clickable commands + one-line explanations

Why this matters

  • Users learn by doing, in context, with zero setup
  • Each cookbook takes 20-30 minutes to write (just example commands and one-line descriptions)
  • High discoverability: /try-valkey/caching/ is a shareable URL for specific use cases
  • Multiple contributors can work on different cookbooks in parallel

Would you be open to accepting PRs for these?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions