490 likes | 1.26k Views
Design Requirements for Distributed Architectures. Performance Issues. Responsiveness A fast and consistent response is required for interactive applications. Determined by Network delay between the client and server Load and performance of the server
E N D
Performance Issues • Responsiveness • A fast and consistent response is required for interactive applications. • Determined by • Network delay between the client and server • Load and performance of the server • Communication delay between software components • Throughput – the rate at which computational work is done. • Balancing computational loads
Quality of Service • Reliability • Security • Performance – guaranteed services • Adaptability to meet changing system configurations • Resource availability
Use of Caching and Replication • Use of caching and replication can improve performance of distributed systems. • An example – Web-caching • How to determine expiry time? • How to validate and update?
Dependability Issues • Fault tolerance • Achieved by redundancy • Trade off between cost and degree of fault tolerance • Security • Protecting data from unauthorized users • Correctness
Modeling for Distributed Systems • Interaction model • Model for communications between processes. • Should consider impact of delay. • Failure model • Defining and classifying faults. • Providing a basis for the analysis of effects of the faults. • Security model • Defining possible attacks. • Help to design the system resisting the attacks.
Interaction Model (1/4) • Performance index of communication channels • Latency (including propagation, transmission, queueing and processing delay) • Bandwidth: the total amount of information that can be transmitted in a given time. • Jitter (Rate and delay)
Interaction Model (2/4) • Computer clock and timing events • There is no global clock in a distributed system. • Clock synchronization is needed.
Interaction Model (3/4) • Two variants of the interaction model • Synchronous model • The time to execute each step of a process has know lower and upper bounds. • Each message transmitted over a channel is received within a known bounded time. • Each process has a local clock whose drift rate from real time has a known bound. • Asynchronous model • No assumption on timing. • Easy to implement. • Not suitable for multimedia systems.
Interaction Model (4/4) • Event ordering – logical time
Failure Model (1/4) • Omission failures • Referring to cases when a process or communication channel fails to perform actions that it is supposed to do. • Process omission failures – crashing • Can be detected by timeout • Difficult to determine timeout period • Communication omission failures • Dropping messages
Class of failure Affects Description Fail-stop Process Process halts and remains halted. Other processes may detect this state. Crash Process Process halts and remains halted. Other processes may not be able to detect this state. Omission Channel A message inserted in an outgoing message buffer never arrives at the other end’s incoming message buffer. Send-omission Process A process completes a send, but the message is not put in its outgoing message buffer. Receive- omission Process A message is put in a process’s incoming message buffer, but that process does not receive it. Arbitrary Process or Process/channel exhibits arbitrary behaviour: it may (Byzantine) channel send/transmit arbitrary messages at arbitrary times, commit omissions; a process may stop or take an incorrect step. Failure Model (2/4) Omission and arbitrary failures
Class of Failure Affects Description Clock Process Process’s local clock exceeds the bounds on its rate of drift from real time. Performance Process Process exceeds the bounds on the interval between two steps. Performance Channel A message’s transmission takes longer than the stated bound. Failure Model (3/4) Timing failures in synchronous systems
Failure Model (4/4) • Failure masking • Failures can be masked either by • hiding it (Replication). • converting it into a more acceptable type of failure (checksum: arbitrary failure -> omission failure). • Both need redundancy • Reliable communication • Validity: any message in the outgoing message buffer is eventually delivered to the incoming message buffer • Integrity: the message received is identical to one sent and not duplicated.
Security Model (1/3) • Secure processes • Secure communication channels • Protecting objects
Secure Model (2/3) • Threats to processes • Servers can be attacked by unauthorized clients. (ex. Denial of service attack) • Clients can be attacked by receiving service (message) from fake servers. • Threats to communication channels • An enemy can copy, alter or inject messages.
Security Model (3/3) • Defeating security threats • Cryptography and shared secrets • Authentication • Including in a message an encrypted portion that contains enough of the contents of the message to guarantee its authenticity. • Secure channel • Encryption and authentication are used to build secure channels. • Ex) Secure socket layer (SSL), Virtual private networks (VPN).
Networking Issues for Distributed Systems • Performance • latency and data transfer rate • Scalability • Reliability • Security • Mobility • Quality of service • Multicast
Types of Network • Local area networks • Relatively high bandwidth and low latency • Ethernet, token ring and slotted ring • Ethernet is not suitable for guaranteed service -> ATM • Wide area networks • Metropolitan area networks • Wireless networks
Network Comparisons Range Bandwidth (Mbps) Latency (ms) LAN 1-2 kms 10-1000 1-10 WAN worldwide 0.010-600 100-500 MAN 2-50 kms 1-150 10 Wireless LAN 0.15-1.5 km 2-11 5-20 Wireless WAN worldwide 0.010-2 100-500 Internet worldwide 0.010-2 100-500
Network Principles • Packet transmission - limited packet length • Fixed buffer size • Bounded delay • Data streaming • For multimedia applications • RSVP, ATM, RTP • Switching schemes • Broadcasting – ethernet • Circuit switching • Packet switching • Frame relay
Network Protocols • Referring to a well-know set of rules and formats to be used for communication between processes. • It defines • a specification of the sequence of messages that must be exchanged. • a specification of the format of the data in the messages.
Layered Protocols • Physical layer • Data link layer • Network layer • Transport layer • Application layer
Routings from A Routings from B Routings from C To Link Cost To Link Cost To Link Cost A local 0 A 1 1 A 2 2 B 1 1 B local 0 B 2 1 A 1 B C 1 2 C 2 1 C local 0 D 3 1 D 1 2 D 5 2 2 Hosts E 1 2 E 4 1 E 5 1 Links 4 3 or local C networks 5 Routings from D Routings from E D 6 E To Link Cost To Link Cost Routers A 3 1 A 4 2 B 3 2 B 4 1 C 6 2 C 5 1 D local 0 D 6 1 E 6 1 E local 0 Routing
Congestion Control • What is “Congestion” ? • Arrival rate > Departure rate • Congestion causes: • Increasing queue length • Longer queueing delay • Packet loss • Congestion Control • Any network management strategy for alleviating or avoiding congestion. • Implemented on routers, by hosts or by a combination of both.
IP Datagram Format 32 bits type of service head. len ver length fragment offset flgs 16-bit identifier upper layer time to live Internet checksum 32 bit source IP address 32 bit destination IP address Options (if any) data (variable length, typically a TCP or UDP segment)
IP Miscellaneous • Best-effort • MTU (Maximum Transmission Unit) • ARP (Address Resolution Protocol) • ICMP (Internet Control Message Protocol) • IP spoofing
IP Version 6 (IPv6) • 128 bit address space • Address notation: 47cd:1234:4422:ac02:0022:1234:a456:0123 • Support “anycast” 3 m n o p 125 – m – n – o – p 010 RegistryID ProviderID SubscriberID SubnetID InterfaceID
IPv6 Packet Header 0 4 12 16 24 31 V ersion T rafficClass FlowLabel PayloadLen NextHeader HopLimit SourceAddress DestinationAddress Next header/data
IPv6 vs. IPv4 • No checksum • No fragmentation • QoS support • Anycast
Mobile IP Sender Subsequent IP packets Mobile host MH tunnelled to FA Address of FA returned to sender First IP packet addressed to MH Internet Foreign agent FA Home First IP packet agent tunnelled to FA
TCP Header Format 0 4 10 16 24 31 Source Port Destination Port Sequence Number Acknowledgement Number U A P R S F Header R C S S Y I Reserved Window Size Length G K H T N N Checksum Urgent Pointer Options Padding Data
TCP Features • Reliable delivery • Sequencing • Acknowledgement • Retransmission • Flow control • Congestion control
“no frills,”“bare bones” Internet transport protocol “best effort” service, UDP segments may be: lost delivered out of order to app connectionless: no handshaking between UDP sender, receiver each UDP segment handled independently of others UDP 32 bits source port # dest port # checksum length Application data (message) UDP segment format
Firewalls • The aims of a firewall security policy • Service control • Behavior control • User control • Filtering levels • IP packet filtering • TCP gateway • Application level gateway