Distributed Architecture
The Distributed software architecture is growing rapidly by facing the new complexities in its nature , in early 1994 the distributed software by MIT was totally basic in comparison with today’s distributed architecture.
A Distributed Architecture consists of many challenges that was talked in my previous articles on Microservice , But there are always some Architectural challenges when we talk about distributed systems, they are aware of microservice challenges.
A Distributed Architecture Challenges focus on
- Reliability : The system shall be reliable and does not have any impact in the whole system
- Consistency and Robustness : Has a consistent behavior and be capable to treat a large number of demands
- Scalability : be able to be scaled by increase of charge
1- Reliability : the reliability of communication describes the trust on the system in which the transactions and messaging act, with a one at least concept, if part of the system goes down the whole system shall continue working till the damaged component get back working, in this category the solutions are exposed by various Cloud providers as Microsoft Azure and Amazon Web Services, you trust fully the system and focus on business boundaries, The Azure Queue service , Service Bus and Amazon Kinesis, SQS are some solutions involved and fully tested by the biggest companies as Airbnb , Accord Hotel , Coca cola and etc..
Add alt text
2- Consistency and robustness : it describes the consistent and robustness nature of a distributed system in which the whole system becomes consistent by publishing the Events , Messages and Component’s Communication via these channels, the whole system keeps working and the failed components get recovered automatically also the System must be capable to support high charge of demands as the peak of system takes place in some hourly fashion per day or daily per week, the system shall has an architecture powerful enough or elastic enough, by the terms the power means your system has an architecture based on the peak times so in the other situations this configuration is wasted and unused , the elasticity term consider adding the power and increment the capacity of the system as needed and it keep the costs useful , the cloud provider introduced some sort of solutions and services for these kind of architectures but the architectural design varies based on the needs , you can optimize your capacity usage , or make the capacity elastic. there are different solutions to achieve this level of consistency and all based on the component nature, there are Some categories as Storage , Data Storage , Infrastructure and communication.
- Storage : The storage shall be distributed over multiple Locations and geography Locations and by using Replication, the system get consistent over any storage device failures
- Data Storage : The Data are in databases and these databases are replicated over multiple Locations , the Read and write replications are included in the design so any failure in one replicate or Master cause a replacement of a healthy node, so the system keeps working, there are solutions as Microsoft Azure SQL which give the availability of elastic pools to extends the DTUs in a horizontal scaling principal and Amazon RDS which provides the Aurora service to have 15 multi regional read replication and one write replication side of Master Write. in any solution the synchronization between replicas are managed in an smooth manner.
Add alt text
- Infrastructure and Communication : it involves in any solutions to achieve more infrastructure resources and balance the consistence of architecture , the AutoScaling , LoadBalancing are some sort of Solutions to achieve consistent infrastructure.An Alternative solution for load balancing is Deferral Message based Communication which can be obtained by a Queue based architecture and the consumers treat the messages based on their capacity of treatment against Loadbalancing in which the LoadBalancer distribute the messages. There are solution as Azure AutoScale , Azure Load Balancer , Amazon Elastic Load Balancer and Amazon AutoScaling.
Add alt text
3- Scalability : it describes the ability to scale the system in a fast and cost efficient manner to get the required performance and capacity, as we had a look in the Consistency and Robustness part the auto scaling can helps the architecture and in the reliability the deferral pub/sub design. the goal of scalability can be described as a fully Consistent and reliable solution , the architectural design can obtain this level of trust and consistence by designing a mixed architectural design side by side of these two types of solutions.
Add alt text
A Distributed Architecture has some characteristics as
- Componentized
- Business Capable
- Automated
- Evolutionary.
(Componentized) In a distributed system the software is composed in one or more components called as Services, This helps us to have a service with a rich capability of business management, there is no need to follow any traversal aspect, just do the business goal, by the years this concept get wider by introducing the Microservices , a Microservice is nothing different from a service ,it’s just minimized in the term of Responsibility, it consists of a service , a team , a workflow , a system and finally a product , what are these concepts ? the term Microservice is driving the teams to be centralized on the business goal in an autonomous manner. A component has an evolutionary life cycle and a rapid production process. (Business Capable)The Boundaries are defined and have evolution by the team agreement, this definition of boundaries help the team to focus on business capabilities, the team becomes enough experienced above the boundaries so any evolution will be done enough rapid. (Automated) as the team can be fast and is responsible for it’s quality the tests are fully covered in the solution, as the tasks keeps small changes so the review will be rapid, by automating the tests the team can go one step forward by doing delivering the product in an automated manner, the failures are recovered and handled automatically without impacting the whole system and finally the infrastructure will be automated, (Evolutionary) the teams are concentrated on the product and any evolution will make the one step through the product, the Code, Dependencies , Configuration and Release will be tracked.