โ† Back to list
rustfs

domain-cloud-native

by rustfs

๐Ÿš€2.3x faster than MinIO for 4KB object payloads. RustFS is an open-source, S3-compatible high-performance object storage system supporting migration and coexistence with other S3-compatible platforms such as MinIO and Ceph.

โญ 20,125๐Ÿด 866๐Ÿ“… Jan 23, 2026

SKILL.md


name: domain-cloud-native description: "Use when building cloud-native apps. Keywords: kubernetes, k8s, docker, container, grpc, tonic, microservice, service mesh, observability, tracing, metrics, health check, cloud, deployment, ไบ‘ๅŽŸ็”Ÿ, ๅพฎๆœๅŠก, ๅฎนๅ™จ"

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 for external
Graceful shutdownSignal handlingtokio::signal
TracingSpan lifecycletracing + OTEL
Health checksHTTP endpointsDedicated routes

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

Score

Total Score

90/100

Based on repository quality metrics

โœ“SKILL.md

SKILL.mdใƒ•ใ‚กใ‚คใƒซใŒๅซใพใ‚Œใฆใ„ใ‚‹

+20
โœ“LICENSE

ใƒฉใ‚คใ‚ปใƒณใ‚นใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+10
โœ“่ชฌๆ˜Žๆ–‡

100ๆ–‡ๅญ—ไปฅไธŠใฎ่ชฌๆ˜ŽใŒใ‚ใ‚‹

+10
โœ“ไบบๆฐ—

GitHub Stars 1000ไปฅไธŠ

+15
โœ“ๆœ€่ฟ‘ใฎๆดปๅ‹•

1ใƒถๆœˆไปฅๅ†…ใซๆ›ดๆ–ฐ

+10
โœ“ใƒ•ใ‚ฉใƒผใ‚ฏ

10ๅ›žไปฅไธŠใƒ•ใ‚ฉใƒผใ‚ฏใ•ใ‚Œใฆใ„ใ‚‹

+5
โ—‹Issue็ฎก็†

ใ‚ชใƒผใƒ—ใƒณIssueใŒ50ๆœชๆบ€

0/5
โœ“่จ€่ชž

ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐ่จ€่ชžใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+5
โœ“ใ‚ฟใ‚ฐ

1ใคไปฅไธŠใฎใ‚ฟใ‚ฐใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+5

Reviews

๐Ÿ’ฌ

Reviews coming soon