Microservices have been trending for years and are considered essential for most projects. Despite their desirability, they can also be a good way to waste money if they're applied unnecessarily.
[ Read 5 things enterprise architects should know about microservices ]
I regularly observe situations where organizations decide to divide their monolithic application into microservices. Sometimes this is done without a valid reason and isn't the best option. How can you know when it's worth the effort to make the switch?
Dividing your monolith into microservices can solve lots of problems. Before migrating, your first task is assessing if your project has issues that microservices can fix.
Things microservices can fix
The following issues are things that can justify a transition to microservices.
- Performance deterioration and development difficulties: When it's increasingly difficult to develop new features, migrating to microservices is justified. Microservices offer better system management and a clearer development process.
- Low fault tolerance: One of the main advantages of microservices is that even if one element is down, the system generally continues to work for end users. Be careful, because although it is popular with users, it's sometimes not the best solution. For instance, when something goes wrong in one part of the system and users can continue working in another, the wrong data might be displayed to them. Therefore, it is sometimes necessary for the entire system to be shut down.
- Towering infrastructure costs: Microservices provide more infrastructure scalability than monoliths. Infrastructure costs are optimized in the microservice model because you pay only for the capacity that you use.
- Individual components require partial scalability: Sometimes a couple of system components become overloaded and require more resources while the rest of the system works below capacity. In a monolith, partial scaling is not possible.
- Working in teams that rarely overlap: In a complex solution, separate subteams form within the engineering team. Usually, each subteam is responsible for a single part of the solution. The teams rarely interact with each other. When this occurs, it makes sense to divide the monolith into separate microservices so that each team maintains its own function.
[ Build a flexible foundation for your organization. Download An architect's guide to multicloud infrastructure. ]
Five steps to a successful microservice architecture
If any of those difficulties impact your project, it probably makes sense to switch to microservices. Once you have decided to go ahead, you need to do it right. Poorly implemented microservices are a waste of time and energy. You will be frustrated because you won't see improvements in your solution's development or performance.
Here's a pipeline to avoid the common mistakes in microservices migration projects.
1. Clearly define your goal and ensure that the whole team is on the same page
Start with the following questions:
- What are the biggest obstacles to your project's success?
- Will the basic benefits of microservices eliminate these obstacles?
- What benefits do you expect from microservices?
- Are all stakeholders on board?
All of these questions are critical. Refer back to practical improvements you can expect from moving to microservices. You should ensure they are what your project needs.
2. Research, research, research
Get your software architect to conduct a detailed study of your solution's architecture and identify dependencies between elements. Get an understanding of how realistic it is to separate these elements and what resources are needed. Once you have basic estimates of what you need, double or triple them for a realistic figure.
It may take an architect several weeks to analyze the call chains for each endpoint. There may be too many cross-dependencies that would be difficult, if not impossible, to separate.
[ Read 3 tips for enterprise architects to solve dependencies ]
If the legacy project was written according to the principle "the more reused code, the better," then the risk of cross-dependency problems is bigger. When you get into this situation, you can either spend more time on the transition or simply ignore the dynamic code analyzer. But this creates a potential future problem. A comprehensive analysis from an architect will help you optimize the work and avoid unpleasant surprises.
3. Map out the work
Pro tip: When approving the future pipeline of work, don't forget to revise your backlog. It may turn out that migration to microservices can be combined with the development plan.
4. Allocate time and resources correctly
Allocate time for this work. Don't leave it as a second priority after the core development. Involve the whole team if possible, not just a few engineers. You will get better results if the developers responsible for a particular section of code are in charge of that respective microservice.
[ Learn best practices for implementing automation across your organization. Download The automation architect's handbook. ]
5. Plan your team's future workflow and the workload of each engineer
This step is worth paying special attention to. It's a misconception to assume that microservices will optimize workflow in a way that lets you shrink your team.
A big value play here is to reorganize your team. I strongly recommend that you develop a system of principal engineers, each responsible for up to five microservices (making changes, code reviews, and so on). It will contribute towards a sense of personal responsibility, reduce confusion, and make the process more streamlined. At the same time, it's unlikely that one principal engineer can oversee more than five microservices, so keep that in mind when optimizing your team.
Wrapping up
Moving to microservices is not a cure-all; it's also not an easy process. The five steps outlined above will save you from underestimating the time and resources required to successfully transition to microservices. Most importantly, this five-step plan will ensure that the transition brings long-term benefits.
[ Become a Red Hat Certified Architect and boost your career. ]
저자 소개
Technical Project Manager at Glorium Technologies with vast experience in implementing complex projects for enterprise companies as well as startups
채널별 검색
오토메이션
기술, 팀, 인프라를 위한 IT 자동화 최신 동향
인공지능
고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트
오픈 하이브리드 클라우드
하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요
보안
환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보
엣지 컴퓨팅
엣지에서의 운영을 단순화하는 플랫폼 업데이트
인프라
세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보
애플리케이션
복잡한 애플리케이션에 대한 솔루션 더 보기
오리지널 쇼
엔터프라이즈 기술 분야의 제작자와 리더가 전하는 흥미로운 스토리
제품
- Red Hat Enterprise Linux
- Red Hat OpenShift Enterprise
- Red Hat Ansible Automation Platform
- 클라우드 서비스
- 모든 제품 보기
툴
체험, 구매 & 영업
커뮤니케이션
Red Hat 소개
Red Hat은 Linux, 클라우드, 컨테이너, 쿠버네티스 등을 포함한 글로벌 엔터프라이즈 오픈소스 솔루션 공급업체입니다. Red Hat은 코어 데이터센터에서 네트워크 엣지에 이르기까지 다양한 플랫폼과 환경에서 기업의 업무 편의성을 높여 주는 강화된 기능의 솔루션을 제공합니다.