distributed-systems

Provides .NET implementation of distributed systems patterns including locking, circuit breaking, retries, bulkheads, and rate limiting with Redis and PostgreSQL.

217|20|Updated Dec 31, 2025
One-click install
npx skills add https://github.com/yonatangross/orchestkit --skill distributed-systems-yonatangross
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: distributed-systems
Source: https://github.com/yonatangross/orchestkit/tree/main/plugins/ork/skills/distributed-systems
Command: npx skills add https://github.com/yonatangross/orchestkit --skill distributed-systems-yonatangross

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires uuid-utils, redis, sqlalchemy, hashlib, asyncio, structlog, httpx, tiktoken, prometheus_client, and includes scripts (resource) and references (resource) and checklists (resource) components.

What problem does it solve?

This Skill addresses the complexities of building reliable distributed systems by providing battle-tested patterns for common challenges like locking, resilience, idempotency, and rate limiting.

Core Features & Use Cases

  • Distributed Locking: Implement locks using Redis or PostgreSQL to coordinate access across services.
  • Resilience Patterns: Integrate circuit breakers, retries with backoff, and bulkheads to handle failures gracefully.
  • Idempotency: Ensure operations can be safely retried without side effects using keys and deduplication.
  • Rate Limiting: Protect your APIs with token bucket or sliding window algorithms.
  • Use Case: When implementing a payment processing system, use distributed locks to prevent double-charging, circuit breakers to isolate failing downstream services, and idempotency keys to ensure payment requests are processed exactly once.

Quick Start

Use the distributed-systems skill to implement a Redis-based distributed lock for processing payments.

Frequently Asked Questions about distributed-systems

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement distributed locks with Redis to prevent double processing?

Distributed locks using Redis can be implemented via the Redlock algorithm and Lua scripts to coordinate access across services and prevent concurrent operations like double-charging. This Skill provides ready-to-use patterns for securing distributed transactions in Redis.

What is the best way to handle failing downstream services in a distributed system?

Circuit breakers with state machines and fallbacks are the best way to handle failing downstream services by stopping cascading failures. This Skill also includes bulkheads for tier-based isolation and retries with exponential backoff to manage resilience.

How do idempotency keys ensure API requests are processed exactly once?

Idempotency keys ensure API requests are processed exactly once by using deduplication and database-backed storage to track processed operations. This mechanism allows clients to safely retry operations without causing duplicate side effects like multiple payments.

Can I use PostgreSQL advisory locks instead of Redis for distributed locking?

Yes, you can use PostgreSQL advisory locks and transaction-level locks as an alternative to Redis for distributed locking. This Skill provides implementations for both PostgreSQL and Redis, allowing you to choose based on your existing database infrastructure.

What rate limiting algorithms are available for protecting APIs in distributed systems?

Token bucket and sliding window algorithms are available for rate limiting to protect APIs in distributed systems. These implementations use Redis to enforce request thresholds and prevent system overload from excessive traffic.