ModernWeb
      • 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
    # 壓力測試大冒險:解鎖應用程式的隱藏性能之謎 / 董淳吉 (Marcus Tung) {%hackmd @ModernWeb/SyA2U6SmT %} > 共筆請從這開始 開場 過去大家比較多都在討論工具 但是比較少提到流程面、專案編排、Test plan 甚至怎麼符合 SLA 和 SLO 也是比較少被討論到的 ## 傳統監控工具挑戰 維運是上線後的挑戰 - Monitor 複雜應用程式的挑戰. 服務愈切愈細, 微服務 ,分散式. 愈難監控. - 可視化 - 大規模用戶挑戰 開始出現瓶頸 - 通常DB會是最早開始「紅」的,因為流量最後還是會回到DB 流量10倍, 會發生什麼事? RD受傷. 好了沒時間了, 你們都變成超級賽亞人吧, #大家的期待, 到底是系統壓力測試, 還是測試RD的抗壓性. 好的系統會有什麼特性? RAS: Reliability, Availability and Serviceability - 可靠性(**R**eliability) - 平均無故障時間(MTBF) : e.g. 20天. - 可用性(High **A**vailability) - SLA : e.g. 99.9% - 可維護性 - 系統修復或維護的簡單性和速度 可維護性為什麼重要,因為維持高可用成本很高 Make it work - [質] Make it right - [質] Make it Fast - [量] 性能佳(Performance) fast大家比較不在意,靠user回報 about Performance x: Concurrent users y: Response time (credit [k6.io](https://k6.io/docs/testing-guides/load-testing-websites/)) 當user愈多時, response time 愈高. 上升到一定點時, 指數上升 (到極效了.) bottleneck '通常'都是backend time 如何知道有效能議題 - single task - system slow 我們怎麼判斷scaling,有依據嗎? - 多少流量需要多少台機器? > 你可以知道他可以承受的量是多少呢? 如果變3倍時, 你要怎麼調整. > cloud 開到一定台數的時候, 財務會來關心你. develop: commit code '趁著雨勢大, 有不好的東西混進來了. ' 如何知道有效能的問題? 要去思考一下. 跟SRE leader 聊天: deploy every 2 week , 對SRE來說就是災難的開始. 沒有人做效能測試就是去賭. 所以SRE會做監控. 系統架構上的瓶頸? 每個資深工程師都要知道.. 面試時 : 10倍時會發生什麼事? 你知道嗎? 你要如何管理? 措施是什麼? 這是資深工程師必需要知道的. 為自己的application負責. - 效能議題 架構:架構瓶頸 效能測試的目的:暸解未知及帶來的風險 KNOWN UNKNOWN: UNKNOWN UNKNOWN:像是串接第三方金流,突然爆掉了,可是你不知道為什麼 效能測試,目的在於減少更多已知的未知,並挖出更多未知的未知。 壓力測試是效能測試的一種 非功能性需求 : 可能是資安相關功能/多語系 less traffic != no performance problems > 只是還沒發現而已, 即使流量少也要做測試. 測試策略 - spike - 短時間有大流量, - smoke - 驗證短時間、最小負載 - averageload - 正常條件 - stress - 超過預期平均值的極限表現 - soak - 長時間可靠性 - breakpoint - 直到爆掉, 測試臨界點 Stress Test: true/false (灣得過拓海/灣不過填海) ## Performance <!-- 需要移動筆記 --> ## 工具選擇 Ruddy: 專案開始之初,要先看見全貌 選工具前需要測試計畫 - 確認商業需求 - 相關人員 - 收集需求 - 測試情境 - 執行 - 結果及報告 工具只是測試計劃的其中一個環節而已. Bussiness Need -> Staksholder > Requirements > Test Scenario > Execution > Result&Report ### business need:定義目標 - Why為什麼需要測試 - Define goals and required - 結果是否符合預期 SLA - 給客戶我們品質的KPI (我們對客戶的承諾, 對外) SLO - 對內定義服務等級目標 SLI - 為了追蹤SLO會制定指標 舉例: 協議: 99% lateency < 300ms SLO: 99% latency < 200ms SLI: 1. 監控指標,例如出現99% latency > 200ms時 2. latency HTTP response 也回200. 3. 99% latency < 100ms 3個加起來, 都會滿足對外宣稱的 99% lateency < 300ms meet SLA 是所有團隊要努力的結果, 要一起去meet 這個KPI 選擇要素 * 測試需求 * 分析報告 * 成本 * 團隊 - 適不適合團隊? * 學習資源 * 用戶介面 * script * 整合與支援 * 系統架構 * Scalability ## Takeaway 挑戰. ?? Goal 工具. ---- > 以下為聊天室 投影片有60多頁. 微軟 MVP 自稱小弟 QQ 他的簡報好勾錐 講師也很勾錐 攝影師又一柱擎天了 +1 正常會用閃光燈嗎 除了這場以外,我是有看過有用的啦 閃光燈是補光效果,會場暗暗的拍出來照片也會暗 不懂就問,K6全名是什麼? => [傳送門](https://k6.io) 樹懶變多了,但是一樣慢,好好笑喔 我隔壁的在度估XD 換我想要度估了 好奇問,這是已經上線後才有的資料,所以這樣的測試規劃會在上線後才發生嗎? 其實壓力測試上線前就要規劃了,測試期間是找出有沒有未達標的問題並提出修正,應該會有壓力測試清單,我覺得是這樣 感謝你 k6 怎麼感覺講測試的時候很容易看到Azure 會提供power point

    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