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
    # 高併發流量的道與術 - 王志清 (Taien) {%hackmd yEJ_rTxzTWa2K450RqmT8w %} > ## 高併發流量的挑戰 > 當流量變成 10 倍 20 倍 (節慶、特賣 ... etc),技術、平台該如何處理? > peak flow solution -> 尖峰時刻是否可預估(解決成本) ### 高並流量的挑戰 - 使用者想要完成服務流程 - 平台想要服務好每個人 ### 不同類型的高併發 - 部落格平台 - 不可預期,突發事件發生就會突然飆高 - 後端邏輯簡易 - 電商平台 - 可預期 - 邏輯複雜(庫存、金流) - 直播 - 不可預期 - 流量最大 - 若無商品販售邏輯為中,若有則與電商一樣 ### 網路流量與道路交通相仿 (可透過擴充來分流) - 擴容 - 以內湖科學園區舉例 - 人口, 逐漸增加跨河橋數量 - 限流/分流:調播車道 ### 道:指導原則(以道路為例) | 類型(道) | 難易度 | 道路舉例 | --- | ----- | ------- | | 限流 | 易 |禁行/減緩 (紅綠燈) | 分流 | 中 | 調播車道 | | 擴展 | 難 | 蓋新車道 | ## 道:指導原則(以網站服務為例) | 類型(道) | 難易度 | 商務運營 | 技術實踐 | | -- | -- | -- | -- | | 限流 | 易 | 限定身份 | 限制人數、服務降級 | | 分流 | 中 | 分時分段、設標定錨 | 橫向擴展 | | 擴展 | 難 | | 垂直升級/橫向擴展 | > ==不匹配商務==的技術發展都是==互相消磨== ## 商務運營戰術 ```四兩撥千斤,借力使力``` ### 分流:分眾、分時、分乘載 #### 分流 - 多樣商品滿足不同受眾 - 把不同的商品列出來 - 切分時段 - ex. 蝦皮 小米秒殺 燦坤秒三 - 對行銷的語言 ```擴大受眾、活動預熱``` > 活動預熱讓人看到 > 切分時段做分流 > 切身份,做進一步分流 > 要拿到訂單、又無負擔 (降低不完整或異常訂單) #### 面對不只是人 > 10000 個人 != 10000 個請求 https://www.slideshare.net/taientw/ss-81331444 - 外部監控:RunScope Assertible 監控寶 對消費者: - 非一次性會員 - 成為活躍會員 - 帶路機 (引發更多消費) 商務 - 擴大運營規模 - 擴大長尾效應 - 降低例外狀況處理 技術 - 靜態活動頁 (分流) - 減少核心主機衝擊 - 正常運營無異常資料 ### 限流:限定身份 - ex. 六福村透過身份、會員限制來客流量 ### 思考: 搶票 - 當天不同時段同時開放 - 當天不同時段不同時開放 技術壓測:錄製單一流程的腳本去測 非技術壓測:讓各種使用者(ex: 內部員工)用各自的操作流程去測 ### 穩定與崩潰的取捨 商務運營拼著系統崩潰的風險也要進行大型促銷 ## 技術實踐戰術 ### 網路服務架構 1.0 ```現代雲基礎:虛擬化與監控``` - 垂直升級:雖然暴力,但效果最好。因架構一大,很多問題容易跑出來。 - 增加本地與遠端快取。 - 快取常見問題:快取預熱、快取穿透、快取雪崩、快取投毒。 - 水平擴展 - 避免單點失效 - 單點失效升級 cluster - 留意邊界極限。 - 提升大型架構存取 - 外部分流 - 大流量因應 - 跨國跨境 - queue - 依業務拆分,業務分前中後台,架構也分前中後台。 - 各元件可視化 - 架構可視的監控系統 >你面對的不只有人 >10000 個人 != 10000 個請求 > 每個成功的公司都有技術債 > 建立護城河和閘道 業績越來越大,架構當然要提升 切勿在一開始就規劃完美架構,這是持續迭代的結果 ### 網路服務架構 2.0( 容器化與微服務) - k8s - AFK 立方 - 更小的粒度:容器化與微服務 ```架構藝術:在現在與未來之間的拿捏``` > FB: https://www.facebook.com/taien.tw ### 技術戰略實踐:重點回顧 - 伺服器元件拆分 - 業務拆分 - 架構粒度拆分 - 實體機 - 虛擬機 - 容器化 - 微服務 - 架構/效能可視化 - 持續迭代優化 #### 非技術性真實壓測 - 小米用 1 折賣可樂,使用真實玩家壓測 #### 架構藝術 DID Design implement Deploy > - 設計 (Design) 20倍的容量 > - 實現 (Implementation) 3倍的容量 > - 部署 (Deploy) 1.5倍的容量 #### 結論 - 技術就是 現流 分流 擴展 - 技術無法解決全部問題,需要商務與技術合作 - 只有最適合的架構 - 了解各元件特性,端上一盤好菜 ###### tags: `MW19`

    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