go-backend-scalability

go-backend-scalability is a cursor rule for Cursor from holtwood/awesome-cursorrules-zh. It costs 0 tokens per session (433 once invoked), scanned A, original, MIT.

A set of coding and architecture rules for scalable Go backends. It covers databases, APIs, concurrency, performance, security, microservices, containers, monitoring, and deployment.

In plain words
What is it for?
Use it when designing Go services, REST or gRPC APIs, database access, caching, concurrent code, Docker or Kubernetes deployments, CI/CD pipelines, and monitoring.
Why use it?
It provides practical guidance when choosing between backend designs and helps keep growing services maintainable, secure, and responsive.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when designing Go services, REST or gRPC APIs, database access, caching, concurrent code, Docker or Kubernetes deployments, CI/CD pipelines, and monitoring.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/holtwood/awesome-cursorrules-zh/go-backend-scalability
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/holtwood/awesome-cursorrules-zh

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for go-backend-scalability

README.md
[![agentmods](https://agentmods.dev/badge/rules/holtwood/awesome-cursorrules-zh/go-backend-scalability/github.svg)](https://agentmods.dev/rules/holtwood/awesome-cursorrules-zh/go-backend-scalability)
Your own site
<a href="https://agentmods.dev/rules/holtwood/awesome-cursorrules-zh/go-backend-scalability"><img src="https://agentmods.dev/badge/rules/holtwood/awesome-cursorrules-zh/go-backend-scalability/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for go-backend-scalability

Your own site · 80×15
<a href="https://agentmods.dev/rules/holtwood/awesome-cursorrules-zh/go-backend-scalability"><img src="https://agentmods.dev/badge/rules/holtwood/awesome-cursorrules-zh/go-backend-scalability.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 433 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00433
Opus 5 $0.00000 $0.00217
Sonnet 5 $0.00000 $0.00087
Haiku 4.5 $0.00000 $0.00043

Measured 9d ago against content hash 02985f1379dd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

go-backend-scalability scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/rules/backend/go/go-backend-scalability.mdc · 23 lines

What it actually says

  • 数据库管理优先选用 SQL/NoSQL 方案,结合业务需求选择合适类型
  • API 开发推荐 REST/gRPC,接口设计遵循简洁与一致性原则
  • 服务端编程采用 Go 语言,注重并发模型与高性能特性
  • 关键路径使用 goroutine 和 channel 实现高并发,避免资源竞争
  • 性能优化关注内存分配、GC、连接池与热点路径剖析
  • 采用负载均衡(如 Nginx、K8s Service)提升系统可扩展性
  • 安全最佳实践:输入校验、认证授权、加密、避免 SQL 注入与 XSS
  • 利用缓存(如 Redis/Memcached)减少数据库压力,提升响应速度
  • 数据建模遵循领域驱动设计(DDD)与解耦思想
  • 微服务架构建议使用 gRPC、消息队列(Kafka、RabbitMQ)实现服务间通信
  • 统一日志与监控(如 Prometheus、Grafana、ELK)便于故障排查与性能分析
  • 测试覆盖单元、集成与端到端测试,推荐使用 Go 原生 testing 包
  • 容器化部署采用 Docker,编排推荐 Kubernetes
  • 持续集成/持续交付(CI/CD)流程自动化构建、测试与部署
  • 代码结构保持简洁、模块化,遵循 Go 语言代码风格与命名约定
  • 关键接口与配置参数建议通过环境变量管理,便于多环境部署
  • 参考官方文档与社区最佳实践,定期审计安全与性能
  • 遇到多种实现方案时,需权衡性能、可维护性与扩展性
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 23 lines · 0 tokens per session scan A 02985f1379dd

Subscribe to this mod's changes

go-backend-scalability is a cursor rule published in the GitHub repository holtwood/awesome-cursorrules-zh (233 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 433 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.