🤖
Sẵn sàng thử sức?
Phỏng vấn thử với AI, nhận đánh giá và feedback chi tiết
Bắt đầu ngay →

Design một E-commerce system (high-level)?

Components:

  • Frontend: Next.js (SSR for SEO), CDN for assets
  • API Gateway: Rate limiting, authentication
  • Services: User, Product, Order, Payment, Notification
  • Database: PostgreSQL (transactions), Redis (cache, sessions)
  • Message Queue: Order processing, email sending
  • Search: Elasticsearch for products

Scaling: Load balancer, horizontal scaling, database read replicas.

Bạn approach một production incident như thế nào?

  1. Acknowledge: Notify stakeholders, update status page
  2. Assess: Scope, severity, affected users
  3. Mitigate: Rollback, feature flag off, scale up
  4. Investigate: Logs, metrics, traces
  5. Fix: Deploy fix, verify
  6. Post-mortem: Root cause, timeline, action items

Làm thế nào để đảm bảo zero-downtime deployment?

  • Blue-Green: 2 identical environments, switch traffic
  • Canary: Deploy to small % users, monitor, rollout
  • Rolling: Update instances one by one
  • Feature flags: Deploy code disabled, enable when ready

Database migrations: Backward compatible, expand-contract pattern.

Làm thế nào để mentor junior developers?

  • Code reviews: Explain why, not just what
  • Pair programming: Work together on complex tasks
  • Documentation: Write guides, decision records
  • 1-on-1s: Regular check-ins, career growth
  • Delegate: Give ownership, allow mistakes

Khi nào bạn quyết định build vs buy?

Build khi:

  • Core business differentiator
  • Specific requirements không có sẵn
  • Long-term cost savings

Buy khi:

  • Commodity feature (auth, payments)
  • Time to market quan trọng
  • Không có expertise in-house

Observability: Logs, Metrics, Traces?

Logs: What happened (ELK, Loki)

Metrics: How much/how fast (Prometheus, Grafana)

Traces: Request flow across services (Jaeger, Zipkin)

Best practices:

  • Correlation IDs for tracing
  • Structured logging (JSON)
  • Key metrics: Latency, error rate, throughput
  • Alerts with appropriate thresholds