β All skills
Microservices Architect
Distributed systems design with event-driven architecture, saga patterns, service mesh, and observability
About this skill
Distributed systems design with event-driven architecture, saga patterns, service mesh, and observability
SKILL.md
microservices-architect.SKILL.mdPlace it in your Syntic skills folder. For Syntic Code, install in your local skills directory, review the contents and run it in a controlled environment first.
---
name: Microservices Architect
description: Distributed systems design with event-driven architecture, saga patterns, service mesh, and observability
category: Engineering
version: 1.0.0
tools: []
---
# Microservices Architect
Design resilient, observable, operationally manageable microservice architectures. Avoid distributed monoliths by enforcing strict service boundaries and async communication.
## Architecture Principles
- A service owns its data. No direct cross-service DB access.
- Default to async. Use synchronous HTTP/gRPC only when client needs immediate response.
- Design for failure. Every network call can fail, timeout, or return stale data.
- Start with modular monolith. Extract services only with clear scaling, deployment, or team boundary reason.
## Service Boundaries
- Define around business capabilities, not technical layers ("Order Management" not "Database Service").
- Each service has its own repository, CI/CD, deployment lifecycle.
- Communicate via well-defined contracts: OpenAPI specs, protobuf, AsyncAPI.
- Shared libraries limited to cross-cutting concerns: logging, tracing, auth. Never share domain logic.
## Event-Driven Architecture
- Use Kafka or NATS JetStream for durable event streaming.
- Publish domain events after state changes (past tense: OrderCreated, PaymentProcessed).
- Events immutable; include full entity state, not just IDs.
- Implement idempotent consumers with deduplication windows.
- Use transactional outbox (Debezium CDC or polling publisher) to guarantee publication.
## Saga Patterns
- Choreography (2-3 services): each reacts to events, emits next.
- Orchestration (Temporal, Step Functions): complex workflows with compensation.
- Every step has compensation. Define rollback before happy path.
- Set timeouts on every saga step; hanging steps trigger compensation.
## Inter-Service Communication
- gRPC with protobuf for sync calls; define .proto in shared schema registry.
- Message brokers for async event-driven communication.
- Circuit breakers with exponential backoff (Resilience4j, Polly, cockatiel).
- Bulkhead isolation: separate thread pools/connection pools per dependency.
## Observability
- Distributed tracing: OpenTelemetry with traceparent header propagation.
- Structured JSON logs with traceId, spanId, service, correlationId.
- SLOs per service: availability 99.9%, latency P99 < 200ms, error rate < 0.1%.
- RED metrics (Rate, Errors, Duration) per endpoint; export to Prometheus + Grafana.
## Data Consistency
- Eventual consistency by default. CQRS when read/write patterns diverge.
- Event sourcing only with audit-trail or temporal-query requirement.
---
Designed for scale, resilience, and operational clarity.
Install
Syntic App
- 1Create a dedicated folder for this skill in your local skills library.
- 2Place SKILL.md into that folder.
- 3Restart Syntic and invoke this skill on matching tasks.
Syntic Code (CLI)
- 1Save SKILL.md in your local Syntic Code skills directory.
- 2Keep related files in the same skill folder.
- 3Run in a safe environment and validate outputs.