PrepZone Logo
PrepZone

Choosing Your Tech Stack

Language, database, cache and queue choices framed by team skill, scale and operational cost.

Read these first

StreamHub runs on Java/Spring Boot services, Postgres, Redis, Kafka, and S3 on AWS EKS. That stack wasn't picked because it's "best" — it matched the team's expertise, hiring pool, and the need for mature ecosystem tooling at streaming scale.

Decision framework

Five lenses for every choice

  • Team skill: What can you ship and operate in 90 days with your current team?
  • Scale target: 1K QPS and 1M QPS need different databases and queues.
  • Operational burden: Managed services vs self-hosted — engineer time is the hidden cost.
  • Ecosystem: Libraries, hiring pool, community support, cloud integration.
  • Migration cost: Today's choice becomes tomorrow's legacy — prefer boring technology.

Language and runtime

AspectJava / Kotlin (Spring Boot)Go
StreamHub fitPrimary backend — team expertise, mature ecosystemEdge services, high-concurrency proxies
ThroughputExcellent with virtual threads (Java 21+)Excellent goroutine concurrency
Startup timeSlower cold start (~2–5 s)Fast (~100 ms) — better for scale-to-zero
HiringLarge pool for enterprise backendsStrong in infra/DevOps roles
When to pickComplex business logic, large teamsCLI tools, sidecars, lightweight services
  • StreamHub fit

    Java / Kotlin (Spring Boot)Primary backend — team expertise, mature ecosystem
    GoEdge services, high-concurrency proxies
  • Throughput

    Java / Kotlin (Spring Boot)Excellent with virtual threads (Java 21+)
    GoExcellent goroutine concurrency
  • Startup time

    Java / Kotlin (Spring Boot)Slower cold start (~2–5 s)
    GoFast (~100 ms) — better for scale-to-zero
  • Hiring

    Java / Kotlin (Spring Boot)Large pool for enterprise backends
    GoStrong in infra/DevOps roles
  • When to pick

    Java / Kotlin (Spring Boot)Complex business logic, large teams
    GoCLI tools, sidecars, lightweight services

Database selection

WorkloadPickWhy not the alternative
Transactional core (users, payments)PostgresACID, joins, mature — not DynamoDB (no joins)
Session cache, rate limitsRedisSub-ms latency — not Postgres (too slow for counters)
Chat message history at scaleCassandra / DynamoDBWrite-heavy, partition by conversation — not Postgres at billions of rows
Full-text searchElasticsearchInverted index, autocomplete — not Postgres LIKE
Analytics / event logClickHouse / BigQueryColumnar aggregation — not OLTP Postgres
  • Transactional core (users, payments)

    PickPostgres
    Why not the alternativeACID, joins, mature — not DynamoDB (no joins)
  • Session cache, rate limits

    PickRedis
    Why not the alternativeSub-ms latency — not Postgres (too slow for counters)
  • Chat message history at scale

    PickCassandra / DynamoDB
    Why not the alternativeWrite-heavy, partition by conversation — not Postgres at billions of rows
  • Full-text search

    PickElasticsearch
    Why not the alternativeInverted index, autocomplete — not Postgres LIKE
  • Analytics / event log

    PickClickHouse / BigQuery
    Why not the alternativeColumnar aggregation — not OLTP Postgres

Polyglot persistence — different stores for different access patterns, not one DB for everything.

Cache and queue

StreamHub choices

  • Cache: Redis Cluster — team knows it, ElastiCache is managed, supports rate limiting + pub/sub + sorted sets.
  • Task queue: RabbitMQ for transcode jobs — priority queues, dead-letter exchanges, simpler ops than Kafka for point-to-point.
  • Event stream: Kafka for viewer analytics and cross-service events — replay, retention, high throughput.
  • Object store: S3 — durability, presigned uploads, lifecycle policies, CDN integration.

Cloud and deployment

StreamHub production architecture (AWS)

HTTPSstaticmissAPICLIENT
Mobile / WebStreamHub cli…
NETWORK
Route 53GeoDNS routing
NETWORK
CloudFrontCDN + WAF edge
NETWORK
AWS ALBTLS terminati…
NETWORK
API GatewayJWT · rate li…
STORAGE
Amazon S3media origin
COMPUTE
Amazon EKSAPI · auth · …
DATABASE
ElastiCachesessions · ho…
DATABASE
RDS Postgresprimary + rep…
INTEGRATION
Amazon MSKdomain events
ANALYTICS
OpenSearchstream discov…
OPS
CloudWatchmetrics · X-R…
End-to-end path from user to data — reference this when placing any new service.
LayerStreamHub choiceAlternative considered
ComputeAWS EKS (Kubernetes)ECS simpler but less portable
CDNCloudFrontCloudflare for DDoS + CDN combo
Load balancerALB (L7)NLB for WebSocket-heavy paths
SecretsAWS Secrets ManagerVault for multi-cloud
ObservabilityOpenTelemetry → Grafana stackDatadog for managed (higher cost)
  • Compute

    StreamHub choiceAWS EKS (Kubernetes)
    Alternative consideredECS simpler but less portable
  • CDN

    StreamHub choiceCloudFront
    Alternative consideredCloudflare for DDoS + CDN combo
  • Load balancer

    StreamHub choiceALB (L7)
    Alternative consideredNLB for WebSocket-heavy paths
  • Secrets

    StreamHub choiceAWS Secrets Manager
    Alternative consideredVault for multi-cloud
  • Observability

    StreamHub choiceOpenTelemetry → Grafana stack
    Alternative consideredDatadog for managed (higher cost)

Buy vs build

AspectBuy (managed)Build (self-hosted)
WhenCommodity capability (auth, email, payments)Competitive differentiator (recommendation engine)
Cost modelPer-unit pricing; predictable earlyEngineer time + infra; cheaper at massive scale
StreamHub buysStripe (payments), SendGrid (email), Auth0 (OAuth)—
StreamHub builds—Stream discovery, live transcoding, chat delivery
  • When

    Buy (managed)Commodity capability (auth, email, payments)
    Build (self-hosted)Competitive differentiator (recommendation engine)
  • Cost model

    Buy (managed)Per-unit pricing; predictable early
    Build (self-hosted)Engineer time + infra; cheaper at massive scale
  • StreamHub buys

    Buy (managed)Stripe (payments), SendGrid (email), Auth0 (OAuth)
    Build (self-hosted)—
  • StreamHub builds

    Buy (managed)—
    Build (self-hosted)Stream discovery, live transcoding, chat delivery

Quick recall

Everything you need if you only revisit this box.

  • Stack choices follow team skill, scale target, ops burden, ecosystem, and migration cost.
  • Polyglot persistence: Postgres for transactions, Redis for cache, Cassandra for write-heavy, ES for search.
  • RabbitMQ for tasks, Kafka for events — hybrid messaging is normal at scale.
  • Buy commodity (auth, payments, email); build differentiators (recommendation, transcoding).
  • Managed services save engineer time early; self-host when cost or control demands it at scale.
  • "Boring technology" that your team can operate beats trendy technology you can't debug at 3 AM.

Test yourself

Answer these before moving on — recall is what makes it stick.