Go vs Node.js untuk Backend di 2026: Kapan Pakai Yang Mana?
Throughput, ekosistem, hiring di Indonesia, dan deployment — decision matrix dari pengalaman ratusan project backend.
TL;DR
- Go menang untuk: microservices, API gateway, CLI tool, infra tooling, workload concurrent berat.
- Node.js menang untuk: MVP rapid prototyping, real-time apps (Socket.IO), integrasi NPM ecosystem, full-stack tim.
Throughput — JSON API benchmark
Angka indikatif untuk gambaran urutan besaran; hasil nyata tergantung setup, beban kerja, dan versi.
Memory footprint (idle)
| Runtime | RAM idle | RAM under load |
|---|---|---|
| Go | ~10 MB | ~80 MB |
| Node.js (V8) | ~80 MB | ~250 MB |
| Bun | ~50 MB | ~180 MB |
Go single binary deploy = lebih ramah container budget.
Ekosistem & developer experience
Node.js:
- NPM punya 3M+ packages — apa pun ada librarynya.
- TypeScript 5.7 sangat mature, IntelliSense bagus di VSCode.
- Async/await bersih, callback hell sudah lewat.
- Hiring di Indonesia: paling banyak supply (full-stack JS).
Go:
- Standard library lengkap untuk web (
net/http,encoding/json,crypto/...). - Module system bersih, dependency tree lebih shallow.
- Tooling included (
go fmt,go test,go vet). - Hiring di Indonesia: lebih sulit, biasanya engineer senior.
Deployment
Go:
go build -o app .
# Single binary 10-30 MB, ship via scp.
Tidak butuh Node runtime di server. Container image bisa < 50 MB pakai Alpine.
Node.js:
npm ci --omit=dev
node dist/index.js
Butuh Node runtime + node_modules (sering 200+ MB). Container bigger, deploy lebih lambat.
Concurrency model
Go:
- Goroutine murah (~2 KB stack), bisa spawn jutaan.
- Channel + select untuk koordinasi.
- Built-in race detector (
go run -race).
Node.js:
- Single-threaded event loop. CPU-bound task block semua.
- Worker thread untuk parallelize (tapi rarely needed).
- Library
clusteruntuk multi-process.
Untuk CPU-bound workload → Go menang telak. Untuk I/O-bound (database, API call) → Node OK karena event loop.
Use case nyata di Lancartech
| Use case | Pilihan | Alasan |
|---|---|---|
| API gateway internal (10K rps) | Go | Throughput, simple deploy |
| Lancartech Billing app | Node.js | Tim TS, integrasi library Mikrotik di NPM |
| WhatsApp multi-device session | Node.js | baileys library |
| Background job worker | Go | Goroutine, less memory |
| Webhook receiver | Go | Concurrency cheap |
| Admin dashboard backend | Node.js | Sharing types dengan Next.js frontend |
Hiring di Indonesia (2026)
| Bahasa | Supply | Average gaji junior |
|---|---|---|
| Node.js / TS | Sangat tinggi | Rp 8-15 juta |
| Go | Medium | Rp 12-20 juta |
| Rust | Sangat rendah | Rp 18-30 juta |
Rekomendasi default
- Tim baru / MVP → Node.js (Hono + TypeScript).
- Microservice production → Go.
- Spike compute-heavy → swap ke Rust hanya untuk service itu.