Chapter 6: Chapter 6. Achieving high reliability at cloud scale
This introduction explains why applications running at cloud scale must be designed for reliability as well as scalability.
After this chapter you will be able to
- Reliability at cloud scale. Explain why an application designed to scale across many cloud servers must also be designed for reliability.
- SOA and cloud architecture. Describe how distributed, loosely coupled systems relate to SOA, cloud computing, and system reliability.
- Distributed System Reliability. Explain why a properly implemented distributed system can be more reliable than a nondistributed system.
- Multitier Web Architectures. Distinguish three-tier and N-tier architectures and explain why the book focuses on them for web and cloud applications.
- Coupling and Application Reliability. Explain what coupling means and why loose coupling helps web applications handle component failures.
- Interface Based Component Dependencies. Distinguish tight and loose coupling at the class level and explain their consequences for changes and reuse.
- SOA services and reuse. Explain how SOA organizes functionality into services that can be combined and reused across business domains.
- Service interfaces and communication. Describe how SOA services expose interfaces and communicate with consumers or other services.
- Loose coupling through abstraction. Explain why treating services as black boxes with simple interfaces supports loose coupling in SOA.
- Service Aggregation and Reuse. Explain how SOA applications can be assembled from existing services and why this can reduce the marginal cost of a new application.
- Service Granularity Tradeoffs. Explain the tradeoffs involved in choosing the size of SOA services.
- Loosely Coupled Service Peers. Describe how loosely coupled services are combined as peers and contrast this with functions bound together by a linker.
- Web services as building blocks. Explain how web services can implement SOA, including their platform independence and use with legacy systems.
- Provider and consumer roles. Trace how a service provider and a service consumer interact through a broker registry to make and use a web service.
- SOA and cloud complementarity. Distinguish SOA as an approach to defining enterprise IT architecture from cloud computing as a deployment architecture, and explain how they can be combined.
- SOA preparation for cloud. Explain how adopting SOA can prepare an enterprise to move services to the cloud.
- Asynchronous communication through SQS. Explain how Amazon SQS enables distributed application components to exchange messages asynchronously over the internet, including its relationship with EC2.
- Application reliability definition. Explain what reliability means for an application and its dependencies, including who defines completion.
- Hardware failures at scale. Explain why an application using thousands of servers can fail even when its software has no detected bugs, and describe the cloud characteristics that add reliability challenges.
- Redundancy and failure recovery. Explain how redundancy helps a system recover from failures, using triple modular redundancy with spares as an example.
- Redundant software validation. Describe how parallel software components can validate one another in testing or production, including their costs and limitations.
- Scale and software reliability. Explain why MapReduce uses parallel processing and software reliability on clusters of commodity computers.
- Master and worker recovery. Describe how a master distributes work to workers and responds to a failed worker.
- Map and reduce functions. Trace how map output is grouped and reduced, using the word-count example.
- Hadoop and MapReduce adoption. Explain Hadoop’s relationship to MapReduce and describe an example of its production use.
What it builds on
- Elasticity: scaling your application as demand rises and falls (chapter 2) · Cloud elasticity lets applications adjust capacity as demand changes.
Section by section
Introduction
This introduction explains why applications running at cloud scale must be designed for reliability as well as scalability.
- Reliability at cloud scale: Explain why an application designed to scale across many cloud servers must also be designed for reliability.
Why it matters: Scaling an application is not enough if hardware failures can undermine its reliability.
Key terms: reliability, scalability, commodity computers, hardware failures, application instances
6.1 SOA as a precursor to the cloud
The section links distributed, loosely coupled systems to SOA, cloud computing, and fault-tolerant architecture.
- SOA and cloud architecture: Describe how distributed, loosely coupled systems relate to SOA, cloud computing, and system reliability.
Why it matters: This connection puts cloud reliability in the context of earlier distributed architectures.
Key terms: distributed systems, loose coupling, SOA, fault-tolerant systems
6.1.1 Distributed systems
This section compares distributed architecture types and explains their relationship to reliability and web applications.
- Distributed System Reliability: Explain why a properly implemented distributed system can be more reliable than a nondistributed system.
Why it matters: Avoiding a single point of failure is central to the section’s explanation of distributed reliability. - Two-Tier Client-Server Architecture: Describe how the client and server divide work in a two-tier client-server architecture.
Why it matters: The two-tier division provides a contrast with moving business logic to a middle tier. - Multitier Web Architectures: Distinguish three-tier and N-tier architectures and explain why the book focuses on them for web and cloud applications.
Why it matters: The distinction explains the architectures the book emphasizes for web and cloud applications. - Clustered Parallel Processing: Describe how a tightly coupled cluster processes a task.
Why it matters: Clustering is a distinct distributed architecture in which machines cooperate on parallel work. - Peer-to-Peer Responsibilities: Describe how responsibilities and client-server roles are distributed in a peer-to-peer architecture.
Why it matters: Peer-to-peer illustrates a distribution of responsibilities without a special central service machine.
Key terms: distributed systems, single point of failure, client-server architectures, two-tier, smart client, three-tier, business logic, stateless clients, N-tier, application server
6.1.2 Loose coupling
This section explains loose coupling, its benefits for reliability and extensibility, and ways components can interact with fewer dependencies.
- Coupling and Application Reliability: Explain what coupling means and why loose coupling helps web applications handle component failures.
Why it matters: Independent components make it easier to keep an application reliable when another component is unavailable. - Interface Based Component Dependencies: Distinguish tight and loose coupling at the class level and explain their consequences for changes and reuse.
Why it matters: Depending on an interface rather than an implementation makes designs easier to extend and change. - Loose Coupling Design Techniques: Describe examples of messaging and interface choices that help maintain loose coupling.
Why it matters: These design choices provide practical ways to reduce dependencies between components. - Published SOA Service Interfaces: Describe how a remote service and its consumer interact through a published interface in the section's SOA example.
Why it matters: A published interface gives a service consumer a defined way to interact with a remote service.
Key terms: coupling, loose coupling, reliability, strong coupling, tight coupling, interface, concrete class, extensibility, vendor- and platform-independent messages, stateless messaging
6.1.3 SOA
This section defines SOA as an approach to building distributed applications from reusable, interoperable, loosely coupled services.
- SOA services and reuse: Explain how SOA organizes functionality into services that can be combined and reused across business domains.
Why it matters: This explains how SOA makes functionality available for use in multiple applications and business domains. - Service interfaces and communication: Describe how SOA services expose interfaces and communicate with consumers or other services.
Why it matters: Interfaces and shared communication let separate services participate in a distributed application. - Loose coupling through abstraction: Explain why treating services as black boxes with simple interfaces supports loose coupling in SOA.
Why it matters: This connects SOA's service-based design to loose coupling between components.
Key terms: SOA, interoperable services, business domains, interface, protocols, endpoint, consumers, XML, loose coupling, black boxes
6.1.4 SOA and loose coupling
This section explains how SOA combines loosely coupled services into applications and the tradeoffs involved in choosing service granularity.
- Remote Service Access: Explain how SOA allows an application to use a capability on another computer, using the certificate authentication example.
Why it matters: Remote access lets a site incorporate another provider’s capability without sending the customer away to complete the process. - Service Aggregation and Reuse: Explain how SOA applications can be assembled from existing services and why this can reduce the marginal cost of a new application.
Why it matters: Reusing and coordinating existing services can make new applications cheaper to assemble. - Service Granularity Tradeoffs: Explain the tradeoffs involved in choosing the size of SOA services.
Why it matters: Choosing service size affects reuse, application complexity, and performance. - Loosely Coupled Service Peers: Describe how loosely coupled services are combined as peers and contrast this with functions bound together by a linker.
Why it matters: Loose coupling supports assembling services in new combinations as requirements emerge.
Key terms: SOA, web service, aggregation, services, orchestration, ad hoc applications, granularity, interface points, processing overhead, loose coupling
6.1.5 SOA and web services
This section explains how web services implement SOA and how providers, brokers, and consumers make services available and usable.
- Web services as building blocks: Explain how web services can implement SOA, including their platform independence and use with legacy systems.
Why it matters: This shows how services can connect different technologies while incorporating existing systems. - Provider and consumer roles: Trace how a service provider and a service consumer interact through a broker registry to make and use a web service.
Why it matters: The roles and discovery sequence explain how one building block can make functionality usable by another. - Service broker scope: Describe how service brokers can differ in audience and catalog focus, and identify UDDI's role.
Why it matters: Broker choices affect who can discover services and what information they can find.
Key terms: SOA, web services, HTTP, legacy systems, service provider, service consumer, web service client, service registry, broker registry, bind
6.1.6 SOA and cloud computing
This section distinguishes SOA from cloud computing and explains how they complement each other and how SOA adoption can prepare an enterprise for the cloud.
- SOA and cloud complementarity: Distinguish SOA as an approach to defining enterprise IT architecture from cloud computing as a deployment architecture, and explain how they can be combined.
Why it matters: This distinction helps you see why moving to the cloud does not replace architectural decisions about services. - SOA preparation for cloud: Explain how adopting SOA can prepare an enterprise to move services to the cloud.
Why it matters: Experience organizing and supporting services can make a cloud move easier to plan.
Key terms: SOA, cloud computing, deployment architecture, services, service components, governance layer, processes, modules
6.1.7 Cloud-based interprocess communication
This section explains how Amazon SQS provides scalable, asynchronous message communication between distributed application components.
- Asynchronous communication through SQS: Explain how Amazon SQS enables distributed application components to exchange messages asynchronously over the internet, including its relationship with EC2.
Why it matters: SQS lets distributed components communicate without having to exchange a message at the same moment. - Queue reliability and concurrency: Describe how SQS stores queued messages and supports simultaneous access by multiple processes.
Why it matters: Persistent storage and concurrent access help a shared queue support distributed application components.
Key terms: Amazon Simple Queue Service, SQS, message queue, asynchronous message-based communication, EC2, persistently stored, highly available, highly reliable queues
6.2 Distributed high-performance cloud reliability
This section defines application reliability and explains why hardware failures at cloud scale challenge it.
- Application reliability definition: Explain what reliability means for an application and its dependencies, including who defines completion.
Why it matters: Reliability depends on the whole application and its supporting components, not just its own code. - Hardware failures at scale: Explain why an application using thousands of servers can fail even when its software has no detected bugs, and describe the cloud characteristics that add reliability challenges.
Why it matters: Perfect software alone cannot eliminate failures in the infrastructure an application depends on.
Key terms: reliability, application reliability, completion, mean-time-to-failure, commodity hardware, virtualization, scale
6.2.1 Redundancy
This section explains how redundant software, data, and hardware can improve application reliability and how cloud infrastructure can reduce the complexity of implementing redundancy.
- Redundancy and failure recovery: Explain how redundancy helps a system recover from failures, using triple modular redundancy with spares as an example.
Why it matters: Redundancy gives a system a way to continue or recover when a component fails. - Redundant software validation: Describe how parallel software components can validate one another in testing or production, including their costs and limitations.
Why it matters: Parallel implementations can improve validation and reliability, but they are not free from shared errors or extra costs. - Cloud infrastructure reliability services: Describe the infrastructure services that support reliable applications and explain how a cloud provider can reduce their complexity.
Why it matters: Provider infrastructure can make otherwise complex reliability techniques easier to use. - Redundant hardware resilience: Explain how redundant hardware protects application reliability and why standardized commodity hardware helps.
Why it matters: Hardware redundancy limits the effect of individual component failures on the application.
Key terms: redundancy, triple modular redundancy with spares, voter, redundant software components, quality-assurance testing, common-cause errors, runtime component redundancy, clustering, load-balancing, data replication
6.2.2 MapReduce
This section explains how MapReduce processes large data sets in parallel on commodity clusters while recovering from worker failures.
- Scale and software reliability: Explain why MapReduce uses parallel processing and software reliability on clusters of commodity computers.
Why it matters: This explains why both parallelism and failure handling are central to MapReduce. - Master and worker recovery: Describe how a master distributes work to workers and responds to a failed worker.
Why it matters: This is the basic way distributed work continues when a worker fails. - Map and reduce functions: Trace how map output is grouped and reduced, using the word-count example.
Why it matters: This shows how small pieces of work become a combined result. - Distributed processing workflow: Trace the MapReduce workflow from input shards through intermediate data to output files.
Why it matters: The workflow shows how intermediate results move between distributed map and reduce tasks. - Parallelism and recovery conditions: Explain the conditions and limits on parallel execution and rescheduling in MapReduce.
Why it matters: These conditions clarify when parallel processing and recovery are possible.
Key terms: commodity computers, massive parallelism, reliability, master, worker, status updates, map, reduce, intermediate key/value pairs, input shard
6.2.3 Hadoop: the open source MapReduce
This section introduces Hadoop as an open source Apache project that makes MapReduce available beyond Google and notes its varied production deployments.
- Hadoop and MapReduce adoption: Explain Hadoop’s relationship to MapReduce and describe an example of its production use.
Why it matters: Hadoop shows how organizations outside Google can use an open source implementation of MapReduce.
Key terms: Hadoop, MapReduce, Apache open source project
6.3 Summary
Where this is used later
- Second and third tiers running in the cloud (chapter 9) · The idea of loose coupling in distributed systems.
- Designing for reliability and MapReduce (chapter 9) · SOA and loose coupling
- Technical operational considerations (chapter 8) · Redundancy as a means of improving reliability.
- Cheaper, more reliable, more secure, and easier to use (chapter 9) · Redundancy for reliability
- Much lower costs than corporate data centers (chapter 9) · Redundancy as a reliability approach
Concepts explained in this chapter
- service-oriented architectureService-oriented architecture (SOA) is an architectural approach in which applications are built from interoperable services communicating over network protocols.
- MapReduceA programming model for processing large datasets by mapping input records into intermediate key-value pairs and reducing values associated with each key.
- distributed systemA system whose computing components communicate across multiple networked computers and coordinate their work.
- parallelismThe execution of multiple tasks at the same time rather than sequentially.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
