帮助你设计或评估Web服务架构、API模式、扩展性与可靠性问题。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "system-type-web-service" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/amplifier-bundle-systems-design/main/skills/system-type-web-service/SKILL.md 2. 保存为 ~/.claude/skills/system-type-web-service/SKILL.md 3. 装好后重载技能,告诉我可以用了
请为电商订单服务设计 API 架构,比较 REST、GraphQL 和 gRPC 的适用场景,并给出资源设计、错误码、鉴权、分页与版本管理建议。
得到一份订单服务 API 设计方案,包含协议选型理由与关键接口规范建议。
请评估一个高并发 Web 服务的扩展性瓶颈,重点分析缓存、数据库分片、队列解耦、限流、读写分离,以及可能的反模式。
得到一份扩展性评估清单,指出潜在瓶颈、风险点与优化方向。
请审查这个请求响应系统的可观测性设计,说明日志、指标、链路追踪、告警策略是否完善,并分析超时、重试、雪崩和级联失败等故障模式。
得到一份可靠性审查结果,包含监控缺口、故障风险与改进建议。
Patterns, failure modes, and anti-patterns for request/response web services.
When to use. Public APIs, browser-facing services, CRUD-heavy domains, when discoverability and cacheability matter. When to avoid. Highly relational data with many nested queries (N+1 fetches). Real-time bidirectional communication. High-throughput internal service-to-service calls where payload efficiency matters. Key decisions. Resource naming, versioning strategy (URL vs header), pagination approach, error format.
When to use. Multiple client types needing different data shapes from the same backend. Complex, nested data relationships. When frontend teams need to iterate independently from backend. When to avoid. Simple CRUD APIs. Server-to-server communication. When caching at the HTTP layer is important (GraphQL's POST-based model breaks HTTP caching). When the team doesn't have GraphQL operational expertise. Key decisions. Schema-first vs code-first, query complexity limits, N+1 resolution strategy (DataLoader pattern), authorization model.
When to use. Internal service-to-service communication. When payload size and serialization speed matter. When you want strongly-typed contracts with code generation. Streaming use cases. When to avoid. Browser clients (requires grpc-web proxy). When human readability of requests matters for debugging. When the team lacks protobuf experience. Public APIs (tooling ecosystem is smaller). Key decisions. Proto file organization, backward compatibility discipline, deadline propagation, load balancing (L7 required for HTTP/2).
Horizontal scaling. Add more instances behind a load balancer. Requires stateless services (or externalized state). The default approach for web services. Watch for: session affinity requirements, connection pool exhaustion at the database, cache consistency across instances.
Vertical scaling. Bigger machines. Simpler than horizontal but has a ceiling. Right for: databases, in-memory workloads, and when horizontal scaling's coordination cost exceeds the performance benefit.
Autoscaling. Scale instance count based on metrics (CPU, request rate, queue depth). Essential for variable load. Watch for: cold start latency, scaling lag, minimum instance counts for availability, cost runaway from misconfigured scaling policies.
CDN and edge caching. Serve static and cacheable dynamic content from edge locations. Dramatically reduces latency and origin load. Watch for: cache invalidation complexity, cache poisoning, TTL tuning, varying content by headers (accept-language, authorization).
Read replicas. Offload read traffic from the primary database. Watch for: replication lag causing stale reads, read-after-write consistency requirements, connection routing complexity.
RDBMS (PostgreSQL, MySQL). Default choice for structured, relational data. Strong consistency, ACID transactions, mature tooling. Scales vertically well; horizontal scaling requires sharding (hard) or read replicas (easier).
Document stores (MongoDB, DynamoDB). When data is naturally document-shaped, schema varies per record, or you need horizontal scaling without sharding complexity. Watch for: lack of joins, transaction limitations across documents, query patterns that don't match the data model.
Key-value stores (Redis, Memcached). Caching, session storage, rate limiting, leaderboards. Extremely fast for simple access patterns. Watch for: data loss on restart (unless configured for persistence), memory limits, using it as a primary datastore when it's a cache.
Search engines (Elasticsearch, OpenSearch). Full-text search, log aggregation, analytics on semi-structured data. Watch for: operational complexity, eventual consistency, write amplification, cluster sizing that's hard to change later.
…
帮助设计可离线运行的边缘系统,处理同步、冲突恢复与弱网故障场景。
帮助设计与评估企业系统集成方案,覆盖遗留改造、网关、事件与失效模式。
用于按七步法系统审查架构设计,识别风险、权衡并产出改进建议。
用 Unix/Linux 设计哲学评估系统方案的可组合性、简洁性与关注点分离。
帮助用户设计或评估基于 Azure 的系统架构与运维方案
帮助设计和评估多租户SaaS的平台隔离、计量计费与稳定性方案
帮助设计或评估命令行工具与开发者 SDK 的架构、兼容性和使用体验
帮助设计或评估单页应用架构,涵盖路由、状态、性能与离线能力。
帮助设计和评估事件驱动、消息驱动与异步工作流系统架构。
帮助用户设计系统、服务与技术架构,并梳理接口、数据模型和服务边界。
帮助设计与评估机器学习训练、部署及实验平台架构方案
帮助设计与评估实时协作系统的连接、同步、冲突处理与故障模式