0Pricing
AWS for Backend Developers (EC2, S3, RDS, Lambda) · درس

المثيلات الفورية والحوسبة الفعّالة من حيث التكلفة

تعلّموا كيفية استخدام مثيلات EC2 Spot وأساطيل المثيلات المختلطة لخفض تكاليف الحوسبة بدرجة كبيرة مع التعامل السلس مع الانقطاعات.

المثيلات الفورية والحوسبة الفعّالة من حيث التكلفة درس مجاني في AWS for Backend Developers (EC2, S3, RDS, Lambda) على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في AWS for Backend Developers (EC2, S3, RDS, Lambda)، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة AWS for Backend Developers (EC2, S3, RDS, Lambda) 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

What Are Spot Instances?

Spot Instances let you use spare EC2 capacity at discounts of up to 90% versus On-Demand pricing.

The catch: AWS can reclaim them with a short warning when it needs the capacity back.

On-Demand vs Reserved vs Spot

Three pricing models:

  • On-Demand — pay per second, no commitment, full price
  • Reserved / Savings Plans — commit for 1-3 years, big discount
  • Spot — cheapest, but interruptible

Good Workloads for Spot

Spot shines for fault-tolerant, flexible workloads:

  • Batch processing and data analysis
  • CI/CD build runners
  • Stateless web tiers behind a load balancer
  • Containerized jobs

The Interruption Notice

Before reclaiming a Spot Instance, AWS sends a two-minute interruption notice via instance metadata. Your app should check for it and shut down gracefully.

curl http://169.254.169.254/latest/meta-data/spot/instance-action

Requesting a Spot Instance

You can request Spot capacity through the CLI, an Auto Scaling group, or a Spot Fleet. Here is a simple run-instances request.

aws ec2 run-instances \
  --image-id ami-123 \
  --instance-type c6g.large \
  --instance-market-options 'MarketType=spot'

Spot in Auto Scaling Groups

Auto Scaling groups support a mixed instances policy: combine On-Demand and Spot in one group, so a baseline stays reliable while Spot adds cheap capacity.

Diversification Reduces Risk

Spreading requests across many instance types and Availability Zones lowers the chance all your capacity is interrupted at once. This is called diversification.

Capacity Rebalancing

Capacity Rebalancing proactively launches a replacement instance when a Spot Instance is at elevated risk of interruption, before the two-minute notice fires.

Handling State

Because instances can vanish, keep state off the instance. Store data in S3, RDS, or DynamoDB, and treat compute as disposable.

Spot with Containers

ECS and EKS both support Spot capacity. The orchestrator reschedules tasks/pods when an instance is reclaimed, making Spot especially safe for containerized workloads.

Cost Strategy Summary

A balanced strategy:

  • Reserved/Savings Plans for steady baseline load
  • On-Demand for unpredictable bursts
  • Spot for flexible, fault-tolerant capacity

Quick Check

Test your Spot knowledge.

Recap

You learned cost-efficient compute:

  • Spot offers up to 90% savings but is interruptible
  • Watch the two-minute interruption notice
  • Diversify across types and AZs
  • Mix Spot, On-Demand, and Reserved for the best balance

Treat compute as disposable and Spot becomes a powerful cost lever.

الأسئلة الشائعة

هل درس «المثيلات الفورية والحوسبة الفعّالة من حيث التكلفة» مجاني؟

نعم — نص درس «المثيلات الفورية والحوسبة الفعّالة من حيث التكلفة» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة AWS for Backend Developers (EC2, S3, RDS, Lambda)، انتقل إلى CoddyKit PRO. تتضمن دورة AWS for Backend Developers (EC2, S3, RDS, Lambda) 4 دروس في المجموع.

ماذا ستتعلم في «المثيلات الفورية والحوسبة الفعّالة من حيث التكلفة»؟

تعلّموا كيفية استخدام مثيلات EC2 Spot وأساطيل المثيلات المختلطة لخفض تكاليف الحوسبة بدرجة كبيرة مع التعامل السلس مع الانقطاعات. تتمرن على AWS for Backend Developers (EC2, S3, RDS, Lambda) مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ AWS for Backend Developers (EC2, S3, RDS, Lambda)؟

لا تُشترط خبرة سابقة. AWS for Backend Developers (EC2, S3, RDS, Lambda) على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.

كم من الوقت يستغرق درس «المثيلات الفورية والحوسبة الفعّالة من حيث التكلفة»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس AWS for Backend Developers (EC2, S3, RDS, Lambda) هذا؟

نعم. كل درس في AWS for Backend Developers (EC2, S3, RDS, Lambda) يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. أنواع مثيلات EC2 وAMIs
  2. تنفيذ مجموعات Auto Scaling
  3. موازنة التحميل باستخدام ELB
  4. المثيلات الفورية والحوسبة الفعّالة من حيث التكلفة
← العودة إلى AWS for Backend Developers (EC2, S3, RDS, Lambda)