By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Study Guide for Data Engineers & ML Practitioners
High availability (HA) and fault tolerance (FT) in ML pipelines ensure your models, data, and inference endpoints stay operational despite failures—whether from hardware crashes, network issues, or sudden traffic spikes. Real-world scenario: A fraud detection system processes 10,000 transactions per second. If the inference endpoint fails, the business loses money and customer trust. HA/FT patterns (like multi-AZ deployments, retries, and dead-letter queues) keep the pipeline resilient. This guide covers AWS services and patterns to design ML systems that survive failures without manual intervention.
Amazon SageMaker Multi-Model Endpoints (MME): AWS service that hosts multiple models behind a single endpoint, auto-scaling based on traffic. Ideal for A/B testing or cost-efficient hosting of many small models (e.g., per-customer recommendation models).
SageMaker Inference Recommender: AWS tool that benchmarks your model’s performance (latency, throughput) across instance types and recommends the best configuration for HA/FT (e.g., "Use ml.g5.2xlarge for 99.9% uptime at 100 TPS").
ml.g5.2xlarge
AWS Step Functions (Express Workflows): Serverless orchestration service for ML pipelines. Express Workflows are ideal for short-lived, high-throughput pipelines (e.g., real-time feature engineering + inference). Supports retries, timeouts, and error handling.
Amazon EventBridge Pipes: Fully managed ETL service that connects sources (Kinesis, SQS) to targets (Lambda, SageMaker) with built-in retries, batching, and dead-letter queues (DLQ). Critical for fault-tolerant data ingestion.
SageMaker Model Monitor: Continuously checks for data drift, concept drift, and model performance degradation. Triggers alerts (via SNS) or auto-rollbacks if accuracy drops below a threshold.
Amazon Kinesis Data Streams (Enhanced Fan-Out): Real-time data streaming with Enhanced Fan-Out for low-latency, high-throughput processing (e.g., fraud detection). Supports multi-AZ replication and retries for failed records.
AWS Glue Streaming ETL: Serverless Spark engine for real-time ETL. Use for fault-tolerant feature engineering (e.g., aggregating clickstream data). Integrates with Kinesis/SQS and supports checkpointing.
SageMaker Processing Jobs (with Retries): Managed environment for data preprocessing, model evaluation, or batch inference. Configure retries (e.g., MaxRetries=3) for transient failures (e.g., S3 throttling).
MaxRetries=3
Amazon SQS (Dead-Letter Queues - DLQ): Decouples pipeline components (e.g., feature store writes → inference). DLQs capture failed messages for later analysis (e.g., "Why did 5% of transactions fail to process?").
SageMaker Shadow Testing: Deploys a new model version alongside the current one (same endpoint) to compare performance before full rollout. Reduces risk of downtime from bad updates.
AWS Auto Scaling (for SageMaker Endpoints): Dynamically adjusts the number of inference instances based on CloudWatch metrics (e.g., CPUUtilization > 70%). Ensures HA during traffic spikes.
CPUUtilization > 70%
Multi-AZ Deployments (SageMaker, RDS, ElastiCache): Replicates resources across Availability Zones (AZs). For ML, this means:
Scenario: A real-time recommendation system for an e-commerce site. Requirements: - 99.9% uptime for inference.- Handle 10K requests/sec with <100ms latency.- Recover from failures without manual intervention.
RetryDuration=300s
kinesis → Lambda (process) → SQS DLQ (if Lambda fails)
MaxAttempts=5
OnlineStoreConfig
ttl=30d
CPUUtilization > 60%
UpdateEndpoint
Ingest → Feature Store → Inference → Post-Processing
Retry: {ErrorEquals: ["Lambda.ServiceException"], MaxAttempts: 3}
RetryStrategy
MaxRetries=2
user_age
SageMaker:Invocations
Kinesis:IteratorAge
Lambda:Errors
Kinesis:IteratorAge > 5s
BackoffRate=2
Trap: Picking SQS for real-time fraud detection (needs ordering → Kinesis).
SageMaker Processing vs. AWS Glue:
Trap: Using Glue for model evaluation (SageMaker Processing is better).
Step Functions Standard vs. Express:
Why: Model Monitor detects drift, alarms trigger rollback via UpdateEndpoint.
Scenario: "A batch inference job fails intermittently due to S3 throttling. How to make it resilient?"
A fintech company runs a real-time fraud detection model. The pipeline ingests 5K transactions/sec via Kinesis, processes them with Lambda, and writes to a SageMaker Feature Store. During peak hours, Lambda throttles, causing data loss. What’s the most cost-effective way to fix this? - A) Increase Lambda memory to 3GB.- B) Replace Lambda with AWS Glue Streaming ETL.- C) Add a SQS DLQ and configure Lambda retries.- D) Use Kinesis Enhanced Fan-Out.
Answer: C) Add a SQS DLQ and configure Lambda retries.Explanation: A DLQ captures failed records, and retries handle transient throttling. Glue (B) is overkill for simple processing, and Enhanced Fan-Out (D) doesn’t solve Lambda throttling.*
A retail company deploys a recommendation model on SageMaker. During a Black Friday sale, traffic spikes to 20K requests/sec, causing latency to exceed 500ms. The team wants to auto-scale the endpoint without downtime. What’s the fastest solution? - A) Manually add more instances to the endpoint.- B) Enable SageMaker auto-scaling with a CloudWatch alarm for CPUUtilization > 60%.- C) Switch to a Multi-Model Endpoint (MME).- D) Use AWS Fargate to host the model.
Answer: B) Enable SageMaker auto-scaling with a CloudWatch alarm.Explanation: Auto-scaling dynamically adjusts instances based on traffic. MME (C) is for hosting multiple models, not scaling, and Fargate (D) is not a native SageMaker option.*
BackoffRate
2
CPUUtilization
InvocationsPerInstance
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.