SRE Conference
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Troubleshooting like an SRE (從 SRE 視角探索故障排除的藝術) - 朱培華 (Jeffrey) {%hackmd @sre-conf/SybJShjx0 %} > 從這開始 ###### tags: `SRE Conference` `2024` 📣📣📣 簡報在這,晚點再放有答案的版本 - Jeffrey https://drive.google.com/drive/folders/1zQeVbMsnPtCWq9bH27R-QpGtnDO-vk6Q?usp=sharing ## What is SRE - Before: prepare - During: fix 溝通、監控平台 - After: review `postmortem` Linux performance 圖片來源: [https://www.brendangregg.com/linuxperf.html](https://www.brendangregg.com/linuxperf.html) ![image](https://hackmd.io/_uploads/SyC9q3uWA.png) Incident Approach: - top-down(From client)/bottom-up(From server) ![截圖 2024-04-26 13.28.16](https://hackmd.io/_uploads/rJxponu-A.png) > top-down: 從第一點到最後一點 > bottom-up: 從最後一點到第一點 1. Is something blocking the visualization? 1. If the DOM tree is correctly built? 1. If all necessary responses are retrieved? 1. If the TLS session is established? 1. If the TCP session is established? 1. Do you have the route to server? 1. Can the domain name be resolved? 1. Can you reach the default gateway? 1. Do you have the ARP entry to the gateway? 1. Is the link both working on tx and rx? 1. Is the link up? ## A SRE SHOULD * SRE 消滅問題 * 實作能力,解決問題的工作 ## Trouble shooting ### Case0: 訂單消失 * role * cancel/not send * missing * retry * Respect any design. 先解決問題,再找原因。 肚子餓會很生氣!! ### Case1: A網頁無法登入 #### 1. 網頁無法登入 - F5 refresh 或無痕 - 球轉給該系統負責人 - 可以請你開 ticket 嗎 (保留軌跡) - 在忙、我不是不回 躺平 #### 2. 網站主機的記憶體用量很高 - Restart service. ~~If not work, restart node!!!!~~ - use top/ps to check memory usage #### 3. memory 被 vmmemctl 吃光光 - 砍了他嗎 :) - 最近有更新嗎? - 什麼時候開始的? 22:00 開始 - 開始什麼? - 記憶體從35MB -> 20GB - 當時有發生什麼事情? - 有設備升級 - 有其他使用者、是不是有其他程序當時跑 - 沒有 #### 4. John 在線等 急? > 講者的公司: 會在 `#company-incident` 開 thread 追蹤進度,固定時間需要回報 John 沒有再問 - 他是老闆捏!? 跟John 報告一下進度 - 好,有問題繼續回報 剛剛有開 Jira ,他會自己去看吧 - 老闆看得懂嗎? #### 5. 設備追問 什麼設備 : 無相干 設備現在狀態 : 很好 設備有downtime :當天有 30 分鐘 更新順利嗎?有狀況嗎? **大斷線** 斷線VM有異狀嗎? - 沒有耶不過VM有飛到其他host 目前網站連線正常嗎? - 正常 #### 6. Root casue HA 切換,服務提供不平均,導致部分 vmmemctl 吃光光記憶體 * 透過群組趕快解決 * 時間序解釋清楚,群組或許有人舉手回答 * 了解資源設備的極限 * 讓大多數的人知道,可得知範圍,及後續的 follow up ### Case 2 App 頁面不出來 #### Initial: 許多使用回報 app 的某頁面轉不出來 - 只有這個頁面 - 滑掉還是一樣 - 回報人數、型號 - 手機到APP經過那些節點 #### Follow up 1 - App來源不同 - 電信業者 - 直接內網連? - 有時候好,有時候不好 - 要不要打電話給電信業者 - 正常 #### Follow up 2 > 原本以為只有中華有問題,沒想到遠傳也出現了 會不會連者VPN? - 沒有 多找幾個人 #### Follow up 3 > Loadbalancer 看到某個分流站台的連線數量特別少 站臺角色? - 很重要, 特別少? - 沒錯,比其他少 分流機制? - 固定使用者固定站台 - load balancer 判斷正常就會分給他 遇到狀態是哪一台? - 都是的第5台 ### Root casue 有一台上版沒有改到 * 重複猜測與詢問 ### Case 3 Queue 資料越來越多了 #### 01.Initial Queue 功能是? - 產生報告服務 消化速度? 什麼樣會出問題?硬碟滿嗎? 客戶現在有狀況嗎? #### 1. 產生報告服務 系統產?還是有人點? - 都有 一份報告跑多久 - 不一定 CPU bound or I/O bound - CPU 有QoS ? - 沒有 - 不論執行時間長短,皆是平等 #### 2. 10worker 狀況 10 worker 都正常 - 看起來全部都卡住 worker 重啟? - 沒有用 #### 3. 找一個worker進去看 strae資料很大,來不及看 看flame graph - CPU 一直在處裡相同資料 把worker 停掉 - 正常了 #### Root cause 有人送出重覆的大資料 task,把所有的 workers 都佔滿,導致無法再處理新的 task --- ===以下聊天區=== 請問有招募區嗎 這需要招募嗎? 公司聲望已經夠大了 ^笑死 非常佛心 這場好嗎 人在隔壁 , 目前還行. 字好小 QQ 字很小,希望投影片最後能釋出 如果方便的話希望有 PPT (許願) 字小到坐後面一點也無法拍照 😂 An SRE or A SRE? index從0開始 matlab 從 1 開始 一定是先問有沒有連上網路 shutdown -r now 治百病 ->那分享的故事應該是如何跑路 ![](https://img-blog.csdnimg.cn/2020022514010922.gif) ![image](https://hackmd.io/_uploads/B1AKbauZR.png) Case 2 :未看先猜DNS解析有問題 徵才!!!!!!! 剛把情境打那麼認真,原來佛心講師有分享投影片 ... 求投影片連結 投影片連結,跪求 跪求解答版本投影片

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully