DevOpsDay
      • 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
    # 微服務的基礎建設 - Service Discovery ###### tags: `DevOpsDays Taipei 2018` `9/11` `11:20~12:00` `Track A` {%hackmd zjE8rohhTBKEAPwdaLV11Q %} [Slides](https://www.slideshare.net/chickenwu/service-discovery-andrew-wu) / [作者部落格](https://columns.chicken-house.net/) 前言 - DEV 和 OPS 要成正向的循環 - 大部分公司的盲點:DEV & OPS 是兩個團隊各跑各的 設計角度 Design for Operation 隨著系統越來越複雜 instance 間的溝通就會越來越複雜,要管理也越來越難 [devops-in-redmine](https://www.redmineup.com/pages/blog/devops-in-redmine) https://www.nginx.com/blog/nginmesh-nginx-as-a-proxy-in-an-istio-service-mesh/ ![](https://cdn-1.wp.nginx.com/wp-content/uploads/2017/09/Modern-Apps-1024x564.png) ## 需求一 如何管理八啦八啦 服務 A 要呼叫服務 B (B 有多個而且數量不固定就連 IP 都可能不固定) - 要怎麼做呼叫 > [service-discovery-in-a-microservices-architecture](https://www.nginx.com/blog/service-discovery-in-a-microservices-architecture/) ## service Discovery Patterns ![](https://i.imgur.com/pvHtk3z.jpg) >這張圖也太長XD >想拍都沒辦法 > ## 高整合度的方案: HashiCorp Consul ### service side disc Pattern https://www.nginx.com/blog/service-discovery-with-nginx-plus-and-consul/ ### client side disc Pattern https://medium.com/containers-on-aws/how-to-setup-service-discovery-in-elastic-container-service-3d18479959e6 ## 需求2:更靈活的服務調度 ### 案例 跨資料服務中心 跨市場的服務配置策略 該如何配置與實作 ## 需求3:管理外部服務 * 外部服務不會來我這裡註冊/移除註冊 * 我無法得知外部服務背後有幾個instance * 如何對外部服務做health check ## 問題4:如何發現『服務發現』? 參考consul官網的架構 [consul](https://www.consul.io/) 每個node配置一個專屬的client 稱為SideCar模式 ## 需求5:如何避免侵入式的問題? ![](https://i.imgur.com/UbXp4pL.jpg) ### 思考:如果每台server都有LB+RP? SOA --> MicroService Architecture --> Cloud Native Architecture ![](https://i.imgur.com/qKnpS9z.png) https://www.facebook.com/photo.php?fbid=10157583170923765&set=a.10150256921053765&type=1 ### 總結 ----- 場外聊天室再開 手要舉好幾次好累 不用放下來了 樓上好辛苦... (想知道) 作者在投影片的「探照燈」效果是怎麼做的? 花錢買 https://www.logitech.com/zh-tw/product/spotlight-presentation-remote 謝謝! (phcome 賣4k 一支, 可以考慮買下來啊) 用 k8s 不就什麼都有了.....? service discovery, load balance, health check .... 一應俱全 還要看公司政策啊 全新的工具也需要學習曲線啊~ 這場很難抓到斷點打成筆記ORZ 感覺需要的先備知識很多... 我幫你去踢講者. (ㄟ .. ) 前面有人提到K8s, 高手啊>.< 其實愈來愈多工具被發明出來,目的就是讓**把 workload 放到平台上運行**這件事情變得更 developer-friendly,不然光是要搞懂今天講的 service discovery 要怎麼做就是一件很複雜的事情,但 k8s 都幫你搞定了,專心在開發就好 k8s + istio ? yes => service mesh istio 是目前比較成熟的專案.....相對啦... > 補充一下,其實很多背景在 40 分鐘內講不完,我用的是 .net, 很多東西看的到用不到啊! service discovery 是介紹背後的原理,consul 只是因為整合度高我拿來當案例而已。比較成熟的是 istio / envoy, k8s 也做掉很多了。沒有自己搞的動機就不要自己弄了,這種年代自己做不划算。不過很多場景是還沒辦法用到 k8s (老舊的系統...) 這時口袋多個 solution 不是件壞事。

    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