SLO, SLI และงบประมาณข้อผิดพลาด
ทำความเข้าใจวิธีกำหนดและใช้งานวัตถุประสงค์ระดับบริการ (SLO) และตัวชี้วัดระดับบริการ (SLI) เรียนรู้การจัดการงบประมาณข้อผิดพลาดสำหรับวิศวกรรมความน่าเชื่อถือ
SLO, SLI และงบประมาณข้อผิดพลาด เป็นบทเรียน System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) ฟรีบน CoddyKit นี่คือบทเรียนที่ 3 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) มีบทเรียนทั้งหมด 4 บทเรียน
บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ
Reliability Goals: SLOs & SLIs
Welcome! In this lesson, we'll dive into Service Level Objectives (SLOs), Service Level Indicators (SLIs), and Error Budgets. These are crucial concepts for defining and maintaining the reliability of your services.
Understanding them helps teams communicate expectations, prioritize work, and ensure a consistent user experience.
What are Service Level Indicators (SLIs)?
An SLI, or Service Level Indicator, is a quantitative measure of some aspect of the service you provide. Think of it as a direct measurement of your system's performance or behavior.
SLIs tell you how well your service is doing from a user's perspective. They are the raw data points we use to evaluate reliability.
Common Types of SLIs
Many different metrics can serve as SLIs. Here are some of the most common ones:
- Latency: The time it takes for a service to respond to a request. (e.g., 99th percentile request latency)
- Error Rate: The proportion of requests that result in an error. (e.g., HTTP 5xx responses)
- Availability: The percentage of time a service is operational and reachable.
- Throughput: The number of requests successfully processed per unit of time.
Choosing Meaningful SLIs
Selecting the right SLIs is key. They should directly reflect what truly matters to your users. For an e-commerce site, for example, the latency of adding an item to a cart is more critical than the latency of an internal admin endpoint.
Focus on user-facing metrics and those that indicate business impact. A few good SLIs are better than many irrelevant ones.
Defining Service Level Objectives (SLOs)
An SLO, or Service Level Objective, is a target value or range for an SLI over a specific period. It's the explicit goal you set for your service's performance.
For example, an SLO might be: "99.9% of requests will have a latency of less than 300ms over a 30-day rolling window."
Crafting Effective SLOs
Good SLOs are:
- Specific: Clearly state what is being measured.
- Measurable: Based on quantifiable SLIs.
- Achievable: Realistic given your resources and system complexity.
- Relevant: Important to users and the business.
- Time-bound: Defined for a specific period (e.g., 7 days, 30 days).
SLOs help align teams on what reliability means for their service.
Introducing Error Budgets
An Error Budget is the maximum amount of time a system can fail or be unavailable without violating its SLO. It's essentially 1 minus your SLO.
If your SLO is 99.9% availability, you have a 0.1% error budget. This budget represents the acceptable amount of 'bad' performance or downtime.
Calculating Your Error Budget
Let's calculate an error budget for a common SLO:
- SLO: 99.9% availability over 30 days.
- Total time in 30 days: 30 days * 24 hours/day * 60 minutes/hour = 43,200 minutes.
- Error Budget Percentage: 100% - 99.9% = 0.1%.
- Error Budget (minutes): 43,200 minutes * 0.001 = 43.2 minutes.
This means your service can be unavailable for up to 43.2 minutes within a 30-day period without violating the SLO.
Managing with Error Budgets
Error budgets are powerful decision-making tools. When your error budget is healthy (plenty of 'bad time' left), teams might prioritize new features or experimental changes.
However, if the error budget is nearly depleted, it signals that reliability work (e.g., bug fixes, stability improvements) must take precedence over new feature development to avoid violating the SLO.
Test Your Knowledge!
Ready to check your understanding of today's concepts?
Recap: SLOs, SLIs, & Error Budgets
Great job! You've learned the core concepts of service reliability engineering:
- SLIs are the specific, measurable metrics of your service.
- SLOs are the target goals set for those SLIs.
- Error Budgets are the acceptable amount of 'unreliability' before an SLO is violated, guiding decisions between features and stability.
These tools are fundamental for building and maintaining highly reliable systems!
เรียนรู้ System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) ด้วย AI tutor — ฟรี
เขียนและเรียกใช้โค้ดจริงในเบราว์เซอร์ของคุณ รับความช่วยเหลือทันทีจาก AI tutor 24/7 และเรียนรู้ต่อจากที่คุณหยุดบนเว็บหรือในแอป
- คอร์ส
- 12
- บทเรียน
- 48
คำถามที่พบบ่อย
บทเรียน “SLO, SLI และงบประมาณข้อผิดพลาด” ฟรีหรือไม่
ใช่ — ข้อความเต็มของ “SLO, SLI และงบประมาณข้อผิดพลาด” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) ให้อัปเกรดเป็น CoddyKit PRO คอร์ส System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) มีบทเรียนทั้งหมด 4 บทเรียน
คุณจะเรียนรู้อะไรในบทเรียน “SLO, SLI และงบประมาณข้อผิดพลาด”
ทำความเข้าใจวิธีกำหนดและใช้งานวัตถุประสงค์ระดับบริการ (SLO) และตัวชี้วัดระดับบริการ (SLI) เรียนรู้การจัดการงบประมาณข้อผิดพลาดสำหรับวิศวกรรมความน่าเชื่อถือ คุณปฏิบัติ System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน
คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) หรือไม่
ไม่จำเป็นต้องมีประสบการณ์มาก่อน System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 3 จากทั้งหมด 4 บทเรียน
บทเรียน “SLO, SLI และงบประมาณข้อผิดพลาด” ใช้เวลานานแค่ไหน
บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย
ฉันเขียนและรันโค้ดในบทเรียน System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) นี้ได้ไหม
ได้ บทเรียน System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ
บทเรียนทั้งหมดในหลักสูตรนี้
- การเชื่อมโยงล็อก ตัวชี้วัด และแทรซ
- การตรวจจับความผิดปกติและการดำเนินงานด้วยปัญญาประดิษฐ์
- SLO, SLI และงบประมาณข้อผิดพลาด
- วิธีการ RED และ USE