# Backend Architecture

> Design and implement scalable backend infrastructure, microservices, and system architecture patterns.

- Skill: `diegosouzapw/backend-architecture` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add diegosouzapw/backend-architecture`
- Raw SKILL.md: https://api.skillmd.com/api/skills/diegosouzapw/backend-architecture/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: diegosouzapw (https://skillmd.com/u/diegosouzapw)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/diegosouzapw/backend-architecture

---


# Backend Architecture Methodology

When designing backend systems:

1. **Analyze Requirements**
   - Identify scalability needs (concurrent users, data volume)
   - Determine consistency vs. availability trade-offs (CAP theorem)
   - Assess latency and throughput requirements

2. **Choose Architecture Pattern**
   - **Monolith**: Simple deployments, tight coupling acceptable
   - **Microservices**: Independent scaling, team autonomy
   - **Serverless**: Event-driven, variable load, minimal ops
   - **Event-Driven**: Async processing, decoupled systems

3. **Design Data Layer**
   - Select appropriate databases (SQL vs. NoSQL vs. hybrid)
   - Design schema with normalization/denormalization trade-offs
   - Plan caching strategy (Redis, Memcached)
   - Consider data partitioning and sharding

4. **Infrastructure Decisions**
   - Container orchestration (Kubernetes, Cloud Run)
   - Message queues (Pub/Sub, RabbitMQ, Kafka)
   - Load balancing and auto-scaling
   - Observability (logging, metrics, tracing)

5. **Security & Reliability**
   - Authentication/authorization (OAuth2, JWT, API keys)
   - Rate limiting and DDoS protection
   - Disaster recovery and backup strategies
   - Circuit breakers and retry policies

## Best Practices

- **Start simple, scale incrementally**: Don't over-engineer early
- **Design for failure**: Assume components will fail
- **Automate everything**: CI/CD, testing, deployments
- **Monitor proactively**: Set up alerts before issues occur
- **Document architecture decisions**: Use ADRs (Architecture Decision Records)

