Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Modular Monolith vs Microservices: Khi nào đội ngũ 10 người không nên tách 20 service

Có một công thức gần như trở thành "nghi thức trưởng thành" ở không ít đội ngũ kỹ thuật: hệ thống mới có vài nghìn người dùng, team backend có đúng 10 kỹ sư, nhưng trên sơ đồ kiến trúc đã chễm chệ 20 microservices , 18 cái repository riêng, 1 cụm Kubernetes 3 tầng và một hệ thống message queue đủ sức làm nóng phòng server chỉ để gửi... email xác nhận đổi mật khẩu. Nghe thì rất "enterprise", rất…

Câu chuyện về việc quyết định xem nên tách những service hay không khi đội ngũ có khoảng 10 người kỹ sư đã xây dựng một monolith thế hệ thứ hai đã được đề cập trong bài viết. Khi đội ngũ giữ khoảng 8–15 người, việc tạo ra 20 microservices, 18 repositories riêng, Kubernetes 3 tầng và hệ thống message queue trở thành một sự phấn đấu không cần thiết. Đối với công ty nhỏ, việc thiết kế theo cơ chế scale the moment bạn cần có nghĩa là cần phải đưa ra quyết định về việc tách thành các service khi đội ngũ có thể đáp ứng được.

Trong quá trình viết bài viết, tác giả đã trình bày về một số ưu điểm của kiến trúc Modular Monolith và cách sử dụng các nguyên tắc thiết kế để tránh khỏi "Spaghetti Monolith". Để giữ vẹn trị của kiến trúc Modular Monolith, tác giả đã đưa ra 4 kỷ luật: giao tiếp qua Public API / Facade, ép ranh giới bằng Architecture Fitness Functions trong CI, đảm bảo sự tổ chức đúng đắn thông qua các thư mục modules và shared, cũng như việc cân nhắc giữa việc sử dụng các công cụ automation để đảm bảo tính linh hoạt và rào cản cho việc import xuyên rào.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Storyboard first, then render: how lovideo turns a PDF into a narrated video

I'm one of the makers of lovideo , a web app that turns an idea, a script or a document into a narrated explainer video. This post is about three workflow decisions we made, and what they look like in…

  • Storyboard serves as approval gate, preventing premature video generation
  • Narration and timing adjusted after storyboard approval, final video 1:18
  • Fine editing delegated to external platform, not integrated within lovideo

I deleted a monitoring dependency that wedged my own event loop

I run a local command console that probes twelve app URLs every sixty seconds and shows live CPU/RAM/disk gauges. It used to depend on systeminformation — a popular Node package that reads OS…

  • Systeminformation package caused event loop to become wedged
  • Node's built-in os module resolved performance bottleneck
  • Replacement with os.totalmem(), os.freemem(), fs.statfsSync fixed issue

More from Sunday, 29 November 2026 →