
Microservices can work for low-latency workloads
Microservices can work for low-latency workloads — if you design for it
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
Distributed Systems
Software Architecture
Software Engineering
Software Development
Microservices can work for low-latency workloads — if you design for it
Benjamin Cane
6 min read·
1 day ago
--
Microservices can work for low-latency workloads if you design them that way.
Photo by Albert Stoynov on Unsplash
Over the years, many people have told me, “Microservices don’t work when you need low latency; use a monolith.” I get it; for many, this advice comes from negative experiences.
When you break a monolith into multiple services, you’re replacing function calls with network calls. Those network calls introduce latency, and the more services you depend on, the slower the overall request becomes.
But does that really mean microservices can’t be used for low-latency systems? No, and I say that from experience.
I’ve spent a lot of time working on low-latency distributed systems, and I think the key is designing your architecture to compensate for the added overhead.
Caveat: Low-latency is subjective; designing a system for single-digit milliseconds vs. double- or triple-digit milliseconds will differ, since every additional digit changes your tolerance.
One thing I really like about cell-based architecture is that it encourages locality, and locality is good for latency. We often talk about cells in the context of resiliency. They contain failures, reduce the blast radius…
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。