System Architecture

This chapter we will start by explaining two most common approaches to applications architecture; monoliths and microservices

Monoliths Application Architecture

Monolithic applications are developed and deployed as a single unit. In the case of Java, the result is often a single WAR or JAR file. Similar statement is true for C++, .Net, Scala and many other programming languages.

MicroService

Microservices are an approach to architecture and development of a single application composed of small services. The key to understanding microservices is their independence. Each is developed, tested and deployed separately from each other. Each service runs as a separate process. The only relation between different microservices is data exchange accomplished through APIs they are exposing. They inherit, in a way, the idea of small programs and pipes used in Unix/Linux. Most Linux programs are small and produce some output. That output can be passed as input to other programs. When chained, those programs can perform very complex operations. It is complexity born from a combination of many simple units.

Key aspects of microservices are as follows.
  • They do one thing or are responsible for one functionality.
  • Each microservice can be built by any set of tools or languages since each is independent of others.
  • They are truly loosely coupled since each microservice is physically separated from others.
  • Relative independence between different teams developing different microservices (assuming that APIs they expose are defined in advance).
  • Easier testing and continuous delivery or deployment.

Monolithic Applications and Microservices Compared

Operational and Deployment Complexity

The primary argument against microservices is increased operational and deployment complexity.This argument is correct, but thanks to relatively new tools it can be mitigated. Configuration Management (CM) tools can handle environment setups and deployments with relative ease.Utilization of containers with Docker significantly reduces deployment pains that microservices can cause. CM tools together with containers allow us to deploy and scale microservices quickly

Remote Process Calls

Another argument for monolithic applications is reduced performance produced by microservices’remote process calls. Internal calls through classes and methods are faster and this problem cannot be removed. How much that loss of performance affects a system depends on case to case basis.The important factor is how we split our system. If we take it towards the extreme with very small microservices (some propose that they should not have more than 10-100 lines of code), this impact might be considerable. I like to create microservices organized around bounded contexts or functionality like users, shopping cart, products, and so on. That reduces the number of remote process calls but still keep services organization within healthy boundaries. Also, it’s important to note that if calls from one microservice to another are going through a fast internal LAN, the negative impact is relatively small.

Scaling
Innovation
Size
Deployment, Rollback and Fault Isolation
Commitment Term
Deployment Strategies
Mutable Monster Server

转载于:https://my.oschina.net/u/3212423/blog/832983

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值