Design Issues of Distributed System
• Design Issues of Distributed System
• Scalability
• Reliability
• Availability
• Consistency
• Latency
• Load Balancing
• Security
• Architectural Design Patterns
• Communication Issues
• Data Management
Scalability
Challenges
• Handling Increased Load: As the number of users or requests increases, the
system must scale accordingly without performance degradation.
• Geographic Distribution: Ensuring performance across geographically
dispersed locations.
• Strategies to Achieve Scalability
Horizontal Scaling: Adding more nodes to the system.
Vertical Scaling: Enhancing the capacity of existing nodes.
Sharding: Dividing the database into smaller, more manageable pieces.
Reliability
Fault Tolerance
• Redundancy: Using duplicate components to take over in case of failure.
• Failover Mechanisms: Automatically switching to a standby system
when the primary system fails.
Redundancy and Replication
• Data Replication: Storing copies of data on multiple nodes to ensure
availability and reliability.
• Consensus Algorithms: Ensuring consistency among replicated data
(e.g., Paxos, Raft).
Availability
Uptime and Downtime Considerations
• High Availability Architectures: Designing systems to minimize downtime.
• Monitoring and Alerting: Using tools to detect and respond to issues
promptly.
Techniques to Improve Availability
• Load Balancers: Distributing incoming requests across multiple servers.
• Geographic Redundancy: Deploying servers in different geographic
locations to avoid single points of failure.
Consistency
• Data Consistency Models
• Strong Consistency: Ensuring that all nodes see the same data at the same
time.
• Eventual Consistency: Allowing for temporary discrepancies between nodes,
with eventual convergence.
• Trade-offs between Consistency and Availability (CAP Theorem)
• CAP Theorem: Understanding the trade-off between Consistency, Availability,
and Partition Tolerance.
Latency
• Sources of Latency
• Network Delays: Time taken for data to travel across the network.
• Processing Delays: Time taken for nodes to process requests.
• Minimization Techniques
• Caching: Storing frequently accessed data closer to the user.
• Data Compression: Reducing the amount of data that needs to be
transferred.
Load Balancing
• Load Distribution Methods
• Round Robin: Distributing requests evenly across servers.
• Least Connections: Directing traffic to the server with the fewest active
connections.
• Dynamic vs. Static Load Balancing
• Dynamic: Adapting to changing loads in real-time.
• Static: Using predetermined load distribution strategies.
Security
• Authentication and Authorization
• Identity Verification: Ensuring that users are who they claim to be.
• Access Control: Restricting access to resources based on user roles.
• Data Encryption and Secure Communication
• Encryption: Protecting data in transit and at rest.
• Secure Protocols: Using HTTPS, SSL/TLS for secure communications.
Architectural Design Patterns
• Client-Server Model
• Centralized Servers: Handling requests from multiple clients.
• Peer-to-Peer Model
• Decentralized Network: Nodes act as both clients and servers.
• Microservices Architecture
• Service Decomposition: Breaking down applications into smaller,
independent services.
• Service-Oriented Architecture (SOA)
• Service Reusability: Designing services to be reused across different
applications.
Communication Issues
• Network Protocols
• TCP/IP: Ensuring reliable, ordered, and error-checked delivery of data.
• UDP: Providing faster, connectionless communication.
• Message Passing vs. Shared Memory
• Message Passing: Communicating by sending messages between nodes.
• Shared Memory: Direct access to a common memory space.
• Synchronous vs. Asynchronous Communication
• Synchronous: Blocking operations until a response is received.
• Asynchronous: Allowing operations to proceed without waiting for a
response.
Data Management
• Data Distribution and Partitioning
• Horizontal Partitioning: Distributing rows of a database across different
nodes.
• Vertical Partitioning: Distributing columns of a database across different
nodes.
• Database Replication
• Master-Slave Replication: One master node with multiple read-only slave nodes.
• Multi-Master Replication: Multiple nodes capable of both read and write operations.
• Handling Distributed Transactions
• Two-Phase Commit: Ensuring all nodes agree on a transaction’s outcome.
• Distributed Ledger Technologies: Using blockchain for immutable and verifiable transactions
Distributed System
• Distributed Systems are networks of independent computers that work together to present
themselves as a unified system. These systems share resources and coordinate tasks across multiple
nodes, allowing them to work collectively to achieve common goals. Key characteristics include:
• Multiple Nodes: Consists of multiple interconnected computers or servers that communicate over a
network.
• Resource Sharing: Enable sharing of resources such as processing power, storage, and data among
the nodes.
• Scalability: This can be scaled by adding more nodes to handle increased load or expand
functionality.
• Fault Tolerance: Designed to handle failures of individual nodes without affecting the overall
system’s functionality.
• Transparency: Aim to hide the complexities of the underlying network, making the system appear as
a single coherent entity to users.
Distributed System Software: This Software enables computers to coordinate their activities and to share the
resources such as Hardware, Software, Data, etc.
Database: It is used to store the processed data that are processed by each Node/System of the Distributed
systems that are connected to the Centralized network
Types of Distributed Systems
there are many models and architectures of distributed systems in use
today.
• Client-server systems: The most traditional and simple type of distributed
system, involves a multitude of networked computers that interact with a
central server for data storage, processing, or other common goal.
• Peer-to-peer networks: They distribute workloads among hundreds or
thousands of computers all running the same software.
• Cell phone networks: It is an advanced distributed system, sharing
workloads among handsets, switching systems, and internet-based
devices.
Working of Distributed System
• As we can see that each Autonomous System has a common Application that can
have its own data that is shared by the Centralized Database System.
• To Transfer the Data to Autonomous Systems, Centralized System should be having a
Middleware Service and should be connected to a Network.
• Middleware Services enable some services which are not present in the local systems
or centralized system default by acting as an interface between the Centralized
System and the local systems. By using components of Middleware Services systems
communicate and manage data.
• The Data which is been transferred through the database will be divided into
segments or modules and shared with Autonomous systems for processing.
• The Data will be processed and then will be transferred to the Centralized system
through the network and will be stored in the database
Characteristics of Distributed System
• Resource Sharing: It is the ability to use any Hardware, Software, or Data anywhere in the System.
• Openness: It is concerned with Extensions and improvements in the system (i.e., How openly the
software is developed and shared with others)
• Concurrency: It is naturally present in Distributed Systems, that deal with the same activity or
functionality that can be performed by separate users who are in remote locations. Every local
system has its independent Operating Systems and Resources.
• Scalability: It increases the scale of the system as a number of processors communicate with more
users by accommodating to improve the responsiveness of the system.
• Fault tolerance: It cares about the reliability of the system if there is a failure in Hardware or
Software, the system continues to operate properly without degrading the performance the system.
• Transparency: It hides the complexity of the Distributed Systems to the Users and Application
programs as there should be privacy in every system.
• Heterogeneity: Networks, computer hardware, operating systems, programming languages, and
developer implementations can all vary and differ among dispersed system components.
Advantages of Distributed System
• Applications in Distributed Systems are Inherently Distributed Applications.
• Information in Distributed Systems is shared among geographically
distributed users.
• Resource Sharing (Autonomous systems can share resources from remote
locations).
• It has a better price performance ratio and flexibility.
• It has shorter response time and higher throughput.
• It has higher reliability and availability against component failure.
• It has extensibility so that systems can be extended in more remote
locations and also incremental growth
Disadvantages of Distributed System
• Relevant Software for Distributed systems does not exist currently.
• Security possess a problem due to easy access to data as the resources are
shared to multiple systems.
• Networking Saturation may cause a hurdle in data transfer i.e., if there is a
lag in the network then the user will face a problem accessing data.
• In comparison to a single user system, the database associated with
distributed systems is much more complex and challenging to manage.
• If every node in a distributed system tries to send data at once, the
network may become overloade
Architecture Styles in Distributed Systems
• Layered Architecture in Distributed Systems
• Peer-to-Peer (P2P) Architecture in Distributed Systems
• Data-Centic Architecture in Distributed Systems
• Service-Oriented Architecture (SOA) in Distributed Systems
Layered Architecture in Distributed Systems
• organizes the system into hierarchical layers, each with specific
functions and responsibilities
• This design pattern helps manage complexity and promotes
separation of concerns
• In a layered architecture, the system is divided into distinct layers,
where each layer provides specific services and interacts only with
adjacent layers.
• This separation helps in managing and scaling the system more
effectively.
Layers and Their Functions
•Presentation Layer
•Function: Handles user interaction and presentation of data. It is responsible for user interfaces and client-side interactions.
•Responsibilities: Rendering data, accepting user inputs, and sending requests to the underlying layers.
•Application Layer
•Function: Contains the business logic and application-specific functionalities.
•Responsibilities: Processes requests from the presentation layer, executes business rules, and provides responses back to the presenta
•Middleware Layer
•Function: Facilitates communication and data exchange between different components or services.
•Responsibilities: Manages message passing, coordination, and integration of various distributed components.
•Data Access Layer
•Function: Manages data storage and retrieval from databases or other data sources.
•Responsibilities: Interacts with databases or file systems, performs data queries, and ensures data integrity and consistency.
Advantages and Disadvantages
Advantages of Layered Architecture in Distributed System
•Separation of Concerns: Each layer focuses on a specific aspect of the system, making it easier to develop, test, and
maintain.
•Modularity: Changes in one layer do not necessarily affect others, allowing for more flexible updates and enhancements.
•Reusability: Layers can be reused across different applications or services within the same system.
•Scalability: Different layers can be scaled independently to handle increased load or performance requirements.
Disadvantages of Layered Architecture in Distributed System
•Performance Overhead: Each layer introduces additional overhead due to data passing and processing between layers.
•Complexity: Managing interactions between layers and ensuring proper integration can be complex, particularly in large-
scale systems.
•Rigidity: The strict separation of concerns might lead to rigidity, where changes in the system’s requirements could require
substantial modifications across multiple layers.
Examples of Layered Architecture in Distributed System
•Web Applications: A common example includes web applications with a presentation layer (user interface), application layer
(business logic), and data access layer (database interactions).
•Enterprise Systems: Large enterprise systems often use layered architecture to separate user interfaces, business logic, and data
management.
Peer-to-Peer (P2P) Architecture in Distributed Systems
• Peer-to-Peer (P2P) Architecture is a decentralized network design
where each node, or “peer,” acts as both a client and a server,
contributing resources and services to the network. This architecture
contrasts with traditional client-server models, where nodes have
distinct roles as clients or servers.
• In a P2P architecture, all nodes (peers) are equal participants in the
network, each capable of initiating and receiving requests.
• Peers collaborate to share resources, such as files or computational
power, without relying on a central serve
Key Features of Peer-to-Peer (P2P) Architecture
• Decentralization
• Function: There is no central server or authority. Each peer operates independently and communicates directly with
other peers.
• Advantages: Reduces single points of failure and avoids central bottlenecks, enhancing robustness and fault tolerance.
• Resource Sharing
• Function: Peers share resources such as processing power, storage space, or data with other peers.
• Advantages: Increases resource availability and utilization across the network.
• Scalability
• Function: The network can scale easily by adding more peers. Each new peer contributes additional resources and
capacity.
• Advantages: The system can handle growth in demand without requiring significant changes to the underlying
infrastructure.
• Self-Organization
• Function: Peers organize themselves and manage network connections dynamically, adapting to changes such as peer
arrivals and departures.
• Advantages: Facilitates network management and resilience without central coordination.
Advantages of Peer-to-Peer (P2P) Architecture in Distributed Systems
• Fault Tolerance: The decentralized nature ensures that the failure of
one or several peers does not bring down the entire network.
• Cost Efficiency: Eliminates the need for expensive central servers and
infrastructure by leveraging existing resources of the peers.
• Scalability: Easily accommodates a growing number of peers, as each
new peer enhances the network’s capacity.
Disadvantages of Peer-to-Peer (P2P) Architecture
• Security: Decentralization can make it challenging to enforce security
policies and manage malicious activity, as there is no central authority
to oversee or control the network.
• Performance Variability: The quality of services can vary depending
on the peers’ resources and their availability, leading to inconsistent
performance.
• Complexity: Managing connections, data consistency, and network
coordination without central control can be complex and may require
sophisticated protocols.

Design Issues of Distributed System (1).pptx

  • 1.
    Design Issues ofDistributed System
  • 2.
    • Design Issuesof Distributed System • Scalability • Reliability • Availability • Consistency • Latency • Load Balancing • Security • Architectural Design Patterns • Communication Issues • Data Management
  • 3.
    Scalability Challenges • Handling IncreasedLoad: As the number of users or requests increases, the system must scale accordingly without performance degradation. • Geographic Distribution: Ensuring performance across geographically dispersed locations. • Strategies to Achieve Scalability Horizontal Scaling: Adding more nodes to the system. Vertical Scaling: Enhancing the capacity of existing nodes. Sharding: Dividing the database into smaller, more manageable pieces.
  • 4.
    Reliability Fault Tolerance • Redundancy:Using duplicate components to take over in case of failure. • Failover Mechanisms: Automatically switching to a standby system when the primary system fails. Redundancy and Replication • Data Replication: Storing copies of data on multiple nodes to ensure availability and reliability. • Consensus Algorithms: Ensuring consistency among replicated data (e.g., Paxos, Raft).
  • 5.
    Availability Uptime and DowntimeConsiderations • High Availability Architectures: Designing systems to minimize downtime. • Monitoring and Alerting: Using tools to detect and respond to issues promptly. Techniques to Improve Availability • Load Balancers: Distributing incoming requests across multiple servers. • Geographic Redundancy: Deploying servers in different geographic locations to avoid single points of failure.
  • 6.
    Consistency • Data ConsistencyModels • Strong Consistency: Ensuring that all nodes see the same data at the same time. • Eventual Consistency: Allowing for temporary discrepancies between nodes, with eventual convergence. • Trade-offs between Consistency and Availability (CAP Theorem) • CAP Theorem: Understanding the trade-off between Consistency, Availability, and Partition Tolerance.
  • 7.
    Latency • Sources ofLatency • Network Delays: Time taken for data to travel across the network. • Processing Delays: Time taken for nodes to process requests. • Minimization Techniques • Caching: Storing frequently accessed data closer to the user. • Data Compression: Reducing the amount of data that needs to be transferred.
  • 8.
    Load Balancing • LoadDistribution Methods • Round Robin: Distributing requests evenly across servers. • Least Connections: Directing traffic to the server with the fewest active connections. • Dynamic vs. Static Load Balancing • Dynamic: Adapting to changing loads in real-time. • Static: Using predetermined load distribution strategies.
  • 9.
    Security • Authentication andAuthorization • Identity Verification: Ensuring that users are who they claim to be. • Access Control: Restricting access to resources based on user roles. • Data Encryption and Secure Communication • Encryption: Protecting data in transit and at rest. • Secure Protocols: Using HTTPS, SSL/TLS for secure communications.
  • 10.
    Architectural Design Patterns •Client-Server Model • Centralized Servers: Handling requests from multiple clients. • Peer-to-Peer Model • Decentralized Network: Nodes act as both clients and servers. • Microservices Architecture • Service Decomposition: Breaking down applications into smaller, independent services. • Service-Oriented Architecture (SOA) • Service Reusability: Designing services to be reused across different applications.
  • 11.
    Communication Issues • NetworkProtocols • TCP/IP: Ensuring reliable, ordered, and error-checked delivery of data. • UDP: Providing faster, connectionless communication. • Message Passing vs. Shared Memory • Message Passing: Communicating by sending messages between nodes. • Shared Memory: Direct access to a common memory space. • Synchronous vs. Asynchronous Communication • Synchronous: Blocking operations until a response is received. • Asynchronous: Allowing operations to proceed without waiting for a response.
  • 12.
    Data Management • DataDistribution and Partitioning • Horizontal Partitioning: Distributing rows of a database across different nodes. • Vertical Partitioning: Distributing columns of a database across different nodes. • Database Replication • Master-Slave Replication: One master node with multiple read-only slave nodes. • Multi-Master Replication: Multiple nodes capable of both read and write operations. • Handling Distributed Transactions • Two-Phase Commit: Ensuring all nodes agree on a transaction’s outcome. • Distributed Ledger Technologies: Using blockchain for immutable and verifiable transactions
  • 13.
    Distributed System • DistributedSystems are networks of independent computers that work together to present themselves as a unified system. These systems share resources and coordinate tasks across multiple nodes, allowing them to work collectively to achieve common goals. Key characteristics include: • Multiple Nodes: Consists of multiple interconnected computers or servers that communicate over a network. • Resource Sharing: Enable sharing of resources such as processing power, storage, and data among the nodes. • Scalability: This can be scaled by adding more nodes to handle increased load or expand functionality. • Fault Tolerance: Designed to handle failures of individual nodes without affecting the overall system’s functionality. • Transparency: Aim to hide the complexities of the underlying network, making the system appear as a single coherent entity to users.
  • 14.
    Distributed System Software:This Software enables computers to coordinate their activities and to share the resources such as Hardware, Software, Data, etc. Database: It is used to store the processed data that are processed by each Node/System of the Distributed systems that are connected to the Centralized network
  • 15.
    Types of DistributedSystems there are many models and architectures of distributed systems in use today. • Client-server systems: The most traditional and simple type of distributed system, involves a multitude of networked computers that interact with a central server for data storage, processing, or other common goal. • Peer-to-peer networks: They distribute workloads among hundreds or thousands of computers all running the same software. • Cell phone networks: It is an advanced distributed system, sharing workloads among handsets, switching systems, and internet-based devices.
  • 16.
    Working of DistributedSystem • As we can see that each Autonomous System has a common Application that can have its own data that is shared by the Centralized Database System. • To Transfer the Data to Autonomous Systems, Centralized System should be having a Middleware Service and should be connected to a Network. • Middleware Services enable some services which are not present in the local systems or centralized system default by acting as an interface between the Centralized System and the local systems. By using components of Middleware Services systems communicate and manage data. • The Data which is been transferred through the database will be divided into segments or modules and shared with Autonomous systems for processing. • The Data will be processed and then will be transferred to the Centralized system through the network and will be stored in the database
  • 17.
    Characteristics of DistributedSystem • Resource Sharing: It is the ability to use any Hardware, Software, or Data anywhere in the System. • Openness: It is concerned with Extensions and improvements in the system (i.e., How openly the software is developed and shared with others) • Concurrency: It is naturally present in Distributed Systems, that deal with the same activity or functionality that can be performed by separate users who are in remote locations. Every local system has its independent Operating Systems and Resources. • Scalability: It increases the scale of the system as a number of processors communicate with more users by accommodating to improve the responsiveness of the system. • Fault tolerance: It cares about the reliability of the system if there is a failure in Hardware or Software, the system continues to operate properly without degrading the performance the system. • Transparency: It hides the complexity of the Distributed Systems to the Users and Application programs as there should be privacy in every system. • Heterogeneity: Networks, computer hardware, operating systems, programming languages, and developer implementations can all vary and differ among dispersed system components.
  • 18.
    Advantages of DistributedSystem • Applications in Distributed Systems are Inherently Distributed Applications. • Information in Distributed Systems is shared among geographically distributed users. • Resource Sharing (Autonomous systems can share resources from remote locations). • It has a better price performance ratio and flexibility. • It has shorter response time and higher throughput. • It has higher reliability and availability against component failure. • It has extensibility so that systems can be extended in more remote locations and also incremental growth
  • 19.
    Disadvantages of DistributedSystem • Relevant Software for Distributed systems does not exist currently. • Security possess a problem due to easy access to data as the resources are shared to multiple systems. • Networking Saturation may cause a hurdle in data transfer i.e., if there is a lag in the network then the user will face a problem accessing data. • In comparison to a single user system, the database associated with distributed systems is much more complex and challenging to manage. • If every node in a distributed system tries to send data at once, the network may become overloade
  • 20.
    Architecture Styles inDistributed Systems • Layered Architecture in Distributed Systems • Peer-to-Peer (P2P) Architecture in Distributed Systems • Data-Centic Architecture in Distributed Systems • Service-Oriented Architecture (SOA) in Distributed Systems
  • 21.
    Layered Architecture inDistributed Systems • organizes the system into hierarchical layers, each with specific functions and responsibilities • This design pattern helps manage complexity and promotes separation of concerns • In a layered architecture, the system is divided into distinct layers, where each layer provides specific services and interacts only with adjacent layers. • This separation helps in managing and scaling the system more effectively.
  • 23.
    Layers and TheirFunctions •Presentation Layer •Function: Handles user interaction and presentation of data. It is responsible for user interfaces and client-side interactions. •Responsibilities: Rendering data, accepting user inputs, and sending requests to the underlying layers. •Application Layer •Function: Contains the business logic and application-specific functionalities. •Responsibilities: Processes requests from the presentation layer, executes business rules, and provides responses back to the presenta •Middleware Layer •Function: Facilitates communication and data exchange between different components or services. •Responsibilities: Manages message passing, coordination, and integration of various distributed components. •Data Access Layer •Function: Manages data storage and retrieval from databases or other data sources. •Responsibilities: Interacts with databases or file systems, performs data queries, and ensures data integrity and consistency.
  • 24.
    Advantages and Disadvantages Advantagesof Layered Architecture in Distributed System •Separation of Concerns: Each layer focuses on a specific aspect of the system, making it easier to develop, test, and maintain. •Modularity: Changes in one layer do not necessarily affect others, allowing for more flexible updates and enhancements. •Reusability: Layers can be reused across different applications or services within the same system. •Scalability: Different layers can be scaled independently to handle increased load or performance requirements. Disadvantages of Layered Architecture in Distributed System •Performance Overhead: Each layer introduces additional overhead due to data passing and processing between layers. •Complexity: Managing interactions between layers and ensuring proper integration can be complex, particularly in large- scale systems. •Rigidity: The strict separation of concerns might lead to rigidity, where changes in the system’s requirements could require substantial modifications across multiple layers. Examples of Layered Architecture in Distributed System •Web Applications: A common example includes web applications with a presentation layer (user interface), application layer (business logic), and data access layer (database interactions). •Enterprise Systems: Large enterprise systems often use layered architecture to separate user interfaces, business logic, and data management.
  • 25.
    Peer-to-Peer (P2P) Architecturein Distributed Systems • Peer-to-Peer (P2P) Architecture is a decentralized network design where each node, or “peer,” acts as both a client and a server, contributing resources and services to the network. This architecture contrasts with traditional client-server models, where nodes have distinct roles as clients or servers. • In a P2P architecture, all nodes (peers) are equal participants in the network, each capable of initiating and receiving requests. • Peers collaborate to share resources, such as files or computational power, without relying on a central serve
  • 27.
    Key Features ofPeer-to-Peer (P2P) Architecture • Decentralization • Function: There is no central server or authority. Each peer operates independently and communicates directly with other peers. • Advantages: Reduces single points of failure and avoids central bottlenecks, enhancing robustness and fault tolerance. • Resource Sharing • Function: Peers share resources such as processing power, storage space, or data with other peers. • Advantages: Increases resource availability and utilization across the network. • Scalability • Function: The network can scale easily by adding more peers. Each new peer contributes additional resources and capacity. • Advantages: The system can handle growth in demand without requiring significant changes to the underlying infrastructure. • Self-Organization • Function: Peers organize themselves and manage network connections dynamically, adapting to changes such as peer arrivals and departures. • Advantages: Facilitates network management and resilience without central coordination.
  • 28.
    Advantages of Peer-to-Peer(P2P) Architecture in Distributed Systems • Fault Tolerance: The decentralized nature ensures that the failure of one or several peers does not bring down the entire network. • Cost Efficiency: Eliminates the need for expensive central servers and infrastructure by leveraging existing resources of the peers. • Scalability: Easily accommodates a growing number of peers, as each new peer enhances the network’s capacity.
  • 29.
    Disadvantages of Peer-to-Peer(P2P) Architecture • Security: Decentralization can make it challenging to enforce security policies and manage malicious activity, as there is no central authority to oversee or control the network. • Performance Variability: The quality of services can vary depending on the peers’ resources and their availability, leading to inconsistent performance. • Complexity: Managing connections, data consistency, and network coordination without central control can be complex and may require sophisticated protocols.