首页 > 其他分享 >[Microservices] Microservices Anti-Patterns

[Microservices] Microservices Anti-Patterns

时间:2024-04-06 15:22:39浏览次数:21  
标签:Microservices microservices will application Anti build each services Patterns

While there are many patterns for doing microservices well, an equally significant number of patterns exist that can quickly get any development team into trouble. The following are some of the don’ts while developing microservices:

Don’t build microservices

The first rule of microservices is don’t start with microservices. When you determine that the monolithic application's complexity negatively affects application development and maintenance, consider refactoring that application into smaller services.

When the application becomes too large to update and maintain easily, these microservices will become ideal for breaking down the complexity and making the application more manageable.

However, until you feel that pain, you don’t even have a monolith that needs refactoring.

Not taking automation seriously

If you have a monolith application, you only need to deploy one piece of software. Once you move to a microservices architecture, you will have more than one application with each having different code, test, and deploy cycles.

Attempting to build microservices without either:

  • proper deployment and monitoring automation, or 

  • managed cloud services to support your now sprawling, heterogenous infrastructure

is asking for a lot of unnecessary trouble.

So, when you are building microservices, always use DevOps or cloud services.

Don’t build nanoservices

If you go too far with the micro in microservices, you could easily find yourself building nanoservices! The complexity of which will outweigh the overall gains of microservices architecture.

Lean toward creating larger services and create smaller services when:

  • Deploying changes becomes difficult

  • The common data model becomes overly complex

  • Loading and scaling requirements no longer synchronize and affect application performance

Don’t turn into SOA

The two concepts; microservices and service-oriented architecture (SOA) are often confused with one another because, at their most basic level, both build reusable individual components that can be consumed by other applications.

However, microservices are fine-grained with independent data storage for each, that is, the bounded context.

A microservices project that morphs into an SOA project will likely buckle under its own weight.

Don’t build a gateway for each service

Instead of implementing end-user authentication, throttle, orchestrate, transform, route, and analytics in each service, you should use an API Gateway.

An API gateway is an API management tool that sits between a client and your collection of backend services.

This will become central to the above-mentioned non-functional concerns and will avoid re-engineering them with each service.

Conclusion

The aim of microservices is to solve the three most frequent challenges, that is, enhance customer experience, be flexible to new requirements, and reduce costs by providing business functions as fine-grained services.

But while doing so, you should avoid the pitfall of the above-mentioned anti-patterns making microservices a nuisance to your development, delivery, and management requirements.

标签:Microservices,microservices,will,application,Anti,build,each,services,Patterns
From: https://www.cnblogs.com/jbite9057/p/18117467

相关文章

  • P3038 [USACO11DEC] Grass Planting G
    原题链接题解树上区间修改加单点查询,虽然可以树状数组,但是线段树更通用一点然而线段树通常处理的是点权,可这里是边权,怎么办呢?我们可以把边权转换成点权,由于每个点的子边有若干个,但父边有且只有一个,这样我们就把边权变成边下方点的点权然后区间修改和单点求和的时候把lca的点权......
  • [Microservices] Microservices Patterns
    Singlepageapplication(SPA)Enabledbymorepowerfulbrowsers,fasterBackendforFrontend(BFF)ProvidesuperiorsupportcomparedtoagenericbackendInsertsalayerbetweenuserexperienceandtheresourcesEnablescustomixeduserexperiencesfordif......
  • [Microservices] Twelve-Factor App Methology
    ModernsoftwaredevelopmentDeliveryasaservice CentrallyhostedandaccessedthroughtheinternetWebapps,software-as-a-serviceTwelve-factorappmethodologyissuitedforwebappsCode->Deploy->Operate Factor1:Codebase:Codefactor......
  • 快速上手SemanticKernel+KernelMemory
    本文撰写目的是旨在帮助新手快速上手,原理部分可以参考博客园大佬宵伯特的教程。KernelMemory入门系列博客:(KernelMemory--宵伯特-博客园(cnblogs.com))SemanticKernel入门系列:(SemanticKernel--宵伯特-博客园(cnblogs.com))为了方便以下SemanticKernel称作SK,Kernel......
  • 详解DROO论文中的order-preserving quantization method(保序量化方法)
    ​一、论文概述1.原文GitHub链接DeepReinforcementLearningforOnlineComputationOffloadinginWirelessPoweredMobile-EdgeComputingNetworks2.原文大意提出了一种深度强化学习方法解决了边缘计算任务卸载决策和资源分配问题。整体分为两大部分:其中第一部......
  • BioXCell,BE0393--InVivoMAb anti-mouse myeloperoxidase (MPO)
    BioXCell--BE0393 InVivoMAbanti-mousemyeloperoxidase(MPO)产品描述:6D1单克隆抗体与小鼠髓过氧化物酶(MPO)反应。MPO是一种过氧化物酶,也是过氧化物酶亚家族的一员。它主要由中性粒细胞表达,也可由单核细胞、巨噬细胞和某些类型的白血病细胞表达。MPO是一种溶酶体蛋白,储存......
  • Effects of Anti Pimples
    看这篇题解这种转化应该比较容易吧,考虑贡献就好了。。转化之后将\(a\)升序排序应该也是比较自然的讲一下为什么这种转化是正确的:我们考虑一一映射。对原来的一个子序列,我们按照其最大值为第一关键字,下标为第二关键字进行排序,显然会唯一映射到某一序列;对排序之后的序列,我们不妨假......
  • 栅格地图路径规划:基于螳螂搜索算法(Mantis Search Algorithm,MSA)的机器人路径规划(提供MA
        一、机器人路径规划介绍移动机器人(Mobilerobot,MR)的路径规划是移动机器人研究的重要分支之,是对其进行控制的基础。根据环境信息的已知程度不同,路径规划分为基于环境信息已知的全局路径规划和基于环境信息未知或局部已知的局部路径规划。随着科技的快速发展以及机器人......
  • Kubernetes Antipatterns
    InKubernetes,identifyingandavoidinganti-patternsiscrucialformaintainingarobustcontainerorchestrationenvironment.Thesemisleadingpracticesmayinitiallyappeareffectivebutcanleadtocomplications.ThisreadingexplorestenprevalentKub......
  • Lecture 06 Rasterization 2 (Antialiasing and Z-Buffering)
    Lecture06Rasterization2(AntialiasingandZ-Buffering)Antialiasing反走样采样理论发生在不同位置(如照相)发生在不同时间(如动画)SamplingArtifacts(指图形学中的错误、看上去不对的地方、瑕疵)锯齿摩尔纹Wagonwheeleffect行进的车轮看起来似乎是向后转的......