How to Build a Scalable Backend Stack for Startups: Languages, Tools, and Architecture
This guide outlines a four‑layer backend stack—languages, components, processes, and systems—and provides detailed recommendations for project management, DNS, load balancing, CDN, RPC frameworks, service discovery, databases, NoSQL, messaging, code management, CI, logging, monitoring, configuration, deployment, jump servers, and machine management, helping startups design a robust, cloud‑native backend architecture.
Introduction
Backend Stack Overview
The backend technology stack can be divided into four layers: the programming languages used (e.g., C++, Java, Go, PHP, Python, Ruby), the components such as message queues and databases, the processes and standards (development, release, monitoring, coding conventions), and the systems that enforce those processes.
Component Selection
1. Project/Bug Management
Redmine – Ruby‑based, many plugins, but some are outdated.
Phabricator – PHP‑based, originally from Facebook, integrates code review, task and document management.
Jira – Java‑based, supports user stories, sprint planning, and extensive reporting.
Wukong CRM – Customer‑centric, suitable for B2B startups, but limited to small customer bases.
2. DNS
Alibaba Wanwang – integrated DNS service from Alibaba.
Tencent DNSPod – widely used in China; for global reach, Amazon Route 53 is recommended.
3. Load Balancing (LB)
Supports L4 (TCP/UDP) and L7 (HTTP/HTTPS) protocols, certificate management, and health checks.
Cloud providers offer managed LB services (Alibaba SLB, Tencent CLB, Amazon ELB); self‑hosted setups often use LVS + Nginx.
4. CDN
Domestic providers: Wangsu, Tencent Cloud, Alibaba Cloud.
International providers: Amazon CloudFront and Akamai.
Startups typically start with a single CDN and add more as traffic grows.
5. RPC Frameworks
Cross‑language: Thrift, gRPC (Google’s high‑performance framework based on HTTP/2 and Protobuf), Hessian, Hprose.
Service‑governance: Dubbo, DubboX, Motan, rpcx (Go), etc.
6. Service Discovery
Client‑side discovery (e.g., Consul, etcd) and server‑side discovery via load balancers.
Common registries: etcd, Consul, Apache ZooKeeper.
7. Relational Databases
Traditional: MySQL (most common), MariaDB (MySQL fork), PostgreSQL, Oracle, DB2.
NewSQL examples: CockroachDB, TiDB, Google Spanner, F1.
8. NoSQL
Key‑value stores: Redis, Memcached.
Column‑family: HBase, Cassandra.
Document stores: MongoDB, CouchDB.
Graph databases: Neo4j, InfoGrid.
9. Message Middleware
Use cases: asynchronous processing, system decoupling, traffic shaping (e.g., flash‑sale order queuing).
Typical choices: Kafka, RabbitMQ, RocketMQ, as well as custom solutions built on MySQL or Redis.
10. Code Management
Git is the de‑facto VCS; GitLab (open‑source) with Gerrit for code review provides strong access control.
11. Continuous Integration (CI)
Jenkins (Java, plugin‑rich), TeamCity, Strider, GitLab CI, Travis CI, Go Cruise Control.
12. Logging System
ELK stack (Elasticsearch, Logstash, Kibana) with Filebeat for collection; Nginx can act as a reverse proxy for security.
13. Monitoring System
Prometheus (pull‑based, Go‑written) with Alertmanager and Grafana for visualization.
Alternative: Zabbix (more common in Asia) and Open‑Falcon.
14. Configuration System
ZooKeeper or etcd with a UI/API layer for versioned configuration and audit.
Alternatively, push‑based configuration via Ansible/Puppet/Chef.
15. Release/Deployment System
Typical flow: code → artifact → deployable service → production environment.
Open‑source tools: Jenkins + GitLab + Walle, or custom pipelines.
16. Jump Server
Jumpserver (open‑source) provides account, authentication, authorization, and audit capabilities.
17. Machine Management
Agent‑less tools (Ansible) vs. agent‑based (Puppet, Chef, SaltStack) depending on scale and language preference.
Startup‑Specific Recommendations
Choose languages familiar to the team and with strong community support.
Prefer mature, widely‑adopted open‑source components over brand‑new ones.
Adopt cloud services early (DNS, DBaaS, MQ, CDN) and replace them with self‑hosted solutions only when scale demands.
Establish clear development, release, and operational processes, and back them with appropriate tooling.
Use Prometheus + Grafana for monitoring, ELK for logging, and a lightweight CI pipeline (Jenkins or GitLab CI) to keep the stack maintainable.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
