Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
actionbook avatar

Domain Cloud Native

  • 1.2k installs
  • 1.3k repo stars
  • Updated May 24, 2026
  • actionbook/rust-skills

domain-cloud-native is a Rust skill defining cloud-native constraints for stateless services, health checks, and observability.

About

The domain-cloud-native skill encodes Layer 3 domain constraints for Rust services targeting Kubernetes and container platforms. It maps 12-factor config, observability, health endpoints, graceful shutdown, horizontal scaling, and small binaries to concrete Rust patterns using tokio, tonic, tracing, opentelemetry, and kube crates. Critical rules forbid local persistent state, require SIGTERM handling with connection draining, and mandate traceable requests via tracing spans. Code patterns document axum health and readiness routes, graceful shutdown with ctrl_c, and external state through Redis or databases instead of static mut. Common mistakes table covers local file state, missing SIGTERM handling, absent tracing, and static configuration. The skill traces constraints down to related m07-concurrency, domain-web, and m12-lifecycle patterns for implementation guidance.

  • Stateless design rule: no local persistent state across pod reschedules.
  • Graceful shutdown pattern with tokio signal and connection draining.
  • Health and readiness HTTP endpoints for Kubernetes orchestration.
  • Key crates: tonic, kube, tracing, opentelemetry, prometheus, bollard.
  • Traces constraints to concurrency, web, and lifecycle companion skills.

Domain Cloud Native by the numbers

  • 1,218 all-time installs (skills.sh)
  • +48 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #23 of 129 Rust skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
From the docs

What domain-cloud-native says it does

RULE: No local persistent state
SKILL.md
npx skills add https://github.com/actionbook/rust-skills --skill domain-cloud-native

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.2k
repo stars1.3k
Security audit3 / 3 scanners passed
Last updatedMay 24, 2026
Repositoryactionbook/rust-skills

What Rust patterns satisfy Kubernetes-ready stateless microservice requirements?

Apply cloud-native Rust constraints for stateless services, health checks, tracing, and graceful shutdown.

Who is it for?

Rust developers building tonic gRPC or axum services for Kubernetes deployment.

Skip if: Skip for desktop-only Rust apps without container orchestration needs.

When should I use this skill?

User builds cloud-native Rust services mentioning kubernetes, docker, grpc, or observability.

What you get

Constraint-backed designs for health routes, tracing, graceful shutdown, and externalized state.

  • cloud-native service patterns
  • health endpoint design
  • observability configuration

By the numbers

  • Covers 4 domain constraint areas: 12-Factor, observability, health checks, and graceful shutdown

Files

SKILL.mdMarkdownGitHub ↗

Cloud-Native Domain

Layer 3: Domain Constraints

Domain Constraints → Design Implications

Domain RuleDesign ConstraintRust Implication
12-FactorConfig from envEnvironment-based config
ObservabilityMetrics + tracestracing + opentelemetry
Health checksLiveness/readinessDedicated endpoints
Graceful shutdownClean terminationSignal handling
Horizontal scaleStateless designNo local state
Container-friendlySmall binariesRelease optimization

---

Critical Constraints

Stateless Design

RULE: No local persistent state
WHY: Pods can be killed/rescheduled anytime
RUST: External state (Redis, DB), no static mut

Graceful Shutdown

RULE: Handle SIGTERM, drain connections
WHY: Zero-downtime deployments
RUST: tokio::signal + graceful shutdown

Observability

RULE: Every request must be traceable
WHY: Debugging distributed systems
RUST: tracing spans, opentelemetry export

---

Trace Down ↓

From constraints to design (Layer 2):

"Need distributed tracing"
    ↓ m12-lifecycle: Span lifecycle
    ↓ tracing + opentelemetry

"Need graceful shutdown"
    ↓ m07-concurrency: Signal handling
    ↓ m12-lifecycle: Connection draining

"Need health checks"
    ↓ domain-web: HTTP endpoints
    ↓ m06-error-handling: Health status

---

Key Crates

PurposeCrate
gRPCtonic
Kuberneteskube, kube-runtime
Dockerbollard
Tracingtracing, opentelemetry
Metricsprometheus, metrics
Configconfig, figment
HealthHTTP endpoints

Design Patterns

PatternPurposeImplementation
gRPC servicesService meshtonic + tower
K8s operatorsCustom resourceskube-runtime Controller
ObservabilityDebuggingtracing + OTEL
Health checksOrchestration/health, /ready
Config12-factorEnv vars + secrets

Code Pattern: Graceful Shutdown

use tokio::signal;

async fn run_server() -> anyhow::Result<()> {
    let app = Router::new()
        .route("/health", get(health))
        .route("/ready", get(ready));

    let addr = SocketAddr::from(([0, 0, 0, 0], 8080));

    axum::Server::bind(&addr)
        .serve(app.into_make_service())
        .with_graceful_shutdown(shutdown_signal())
        .await?;

    Ok(())
}

async fn shutdown_signal() {
    signal::ctrl_c().await.expect("failed to listen for ctrl+c");
    tracing::info!("shutdown signal received");
}

Health Check Pattern

async fn health() -> StatusCode {
    StatusCode::OK
}

async fn ready(State(db): State<Arc<DbPool>>) -> StatusCode {
    match db.ping().await {
        Ok(_) => StatusCode::OK,
        Err(_) => StatusCode::SERVICE_UNAVAILABLE,
    }
}

---

Common Mistakes

MistakeDomain ViolationFix
Local file stateNot statelessExternal storage
No SIGTERM handlingHard killsGraceful shutdown
No tracingCan't debugtracing spans
Static configNot 12-factorEnv vars

---

Trace to Layer 1

ConstraintLayer 2 PatternLayer 1 Implementation
StatelessExternal stateArc<Client> for external
Graceful shutdownSignal handlingtokio::signal
TracingSpan lifecycletracing + OTEL
Health checksHTTP endpointsDedicated routes

---

Related Skills

WhenSee
Async patternsm07-concurrency
HTTP endpointsdomain-web
Error handlingm13-domain-error
Resource lifecyclem12-lifecycle

Related skills

Forks & variants (1)

Domain Cloud Native has 1 known copy in the catalog totaling 609 installs. They canonicalize to this original listing.

How it compares

Use domain-cloud-native for Rust K8s service constraints, not for generic Docker Compose local dev without orchestration needs.

FAQ

Why forbid local file state?

Pods can be killed or rescheduled anytime; state must live in external stores.

Which crates handle tracing?

tracing and opentelemetry per the documented key crates table.

How should shutdown work?

Handle SIGTERM with tokio signal and drain connections for zero-downtime deploys.

Is Domain Cloud Native safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Rustbackenddevops

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.