Addo Zhang
    • Create new note
    • Create a note from template
      • 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
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me 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
    • Save as template
    • 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 Create Help
Create Create new note Create a note from template
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
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me 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
    随着云计算的兴起,企业的网络基础设施迅速发展和演变。无论是公有云、私有云还是边缘计算,都为企业带来了前所未有的机会和挑战。流量管理技术,如 CDN、隧道、WAF 等,也不断适应新的需求和环境。 ## 背景 怎么会有这么多的流量管理设施? ![](https://atbug.oss-cn-hangzhou.aliyuncs.com/2023/10/17/network-infrastructure.png) ### 云计算推动网络变革 公有云,如 AWS、Google Cloud、阿里云、华为云、腾讯云等,为企业提供了可扩展的、按需付费的计算资源。相比于传统的数据中心,公有云为企业节省了大量的前期投入,同时提供了高度的弹性和可扩展性。**这些头部云供应商在运营商之外,部署了高质量的跨地域网络。同时推动数据中心内部网络的高带宽、软件化。** 私有云则是为企业提供了定制化的解决方案,将云的优势结合到企业的私有环境中。这允许企业对数据和应用有更多的控制,同时仍然享受云计算的好处。**以 VMWare、OpenStack、Kubernetes 为主要驱动力,推动了自有数据中心里私有云网络的进化。** 边缘计算是一种新兴的技术,将计算资源从中心化的数据中心转移到距离数据源更近的地方。这样可以提高数据处理的速度和效率,特别是对于需要实时处理的应用,如物联网和虚拟现实。**高速增长的边缘的数量和算力在叠加以后,逐渐分担了云端的负载,网络也在配套的高速演进。** ### 安全和监管需求 随着企业越来越依赖云计算,监管问题也变得日益重要。**数据安全、隐私保护和合规性都是企业必须考虑的问题。**为了满足这些需求,流量管理技术也必须进行相应的调整。 ### 企业系统不断演进 现代企业中运行的应用程序类型多种多样,包括传统的单体应用、微服务、容器化应用等。这些应用需要不同类型的流量管理工具来支持。**不管是技术演进的需求、业务负载性还是历史遗留等因素,都导致企业或多或少都使用到集中流量管理设施,且随着时间的延长,这些设施可能会越来越多。** ## 流量管理设施 ### 1. CDN (内容分发网络) CDN 是由全球分布的服务器网络构成,这些服务器将网站和 Web 应用程序的内容作为缓存存储。当用户请求这些内容时,CDN 会选择物理距离用户最近的节点,从而提高内容的加载速度和可用性。减少原始服务器的负担、提高内容加载速度、增强网站的高可用性。 ### 2. 隧道 隧道技术能够在公共网络上建立一个私有链接,确保数据的私密性和完整性。这通常是通过数据加密和封装实现的。以此提供安全的远程访问、数据保密性、能够绕过地理或网络限制。 ### 3. WAF (Web 应用防火墙) WAF 的主要目的是保护 Web 应用程序不受各种威胁的影响,特别是针对 HTTP 流量的攻击。提供实时流量监控、防止常见的 Web 攻击、保护应用免受零日威胁。 ### 4. 4LB (四层负载均衡器) 这是一种在传输层上工作的负载均衡器。它基于源和目标 IP 地址及端口号来决定如何分发流量。可以提升系统的高可用性、分散高流量、减少单点故障的风险。 ### 5. 静态 Web 服务 这些服务托管不经常更改的内容,例如 HTML、CSS 或图片。相对于动态内容,静态内容的响应时间更快,因为它们不需要任何后端处理。这类基础设施有着高性能、低成本、简化内容部署的特点。 ### 6. 反向代理 反向代理位于客户端和 Web 服务器之间,接收客户端的请求并决定将其转发到哪个服务器,然后返回服务器的响应给客户端。同时提供负载均衡、SSL 终止、内容缓存、压缩、加速等功能。 ### 7. 正向代理 位于客户端和目标服务器之间,为客户端向外部网络发出的请求提供服务。当使用正向代理时,客户端的请求首先发送到代理服务器,代理服务器再将请求转发到目标服务器。目标服务器的响应会被代理服务器收到,然后再转发给客户端。正向代理同时还会具备如内容管理、访问控制、数据压缩、日志审计、协议转换等能力。 ### 8. 7LB (七层负载均衡器) 这种负载均衡器在应用层上工作,可以根据 HTTP 头部、URL 或其他应用层信息来决定流量的路由。 提供灵活的流量路由、应用级健康检查、限流限速、黑白名单、会话保持、日志记录等功能。 ### 9. API 网关 API 网关是处理 API 调用的基础设施,主要角色是 API 的管理和中介,它在处理请求之前或之后执行许多功能,如请求路由、认证和限速等,简化 API 调用、提供统一入口、加强安全、细粒度的流量控制。 ### 10. 出口网关 这是控制和管理所有出站流量的基础设施组件,尤其是在容器化或微服务环境中,安全的流量控制、流量审计、防止数据泄露。 可能有点类似正向代理,但不同的是出口网关多在微服务或服务网格环境中使用,而正向代理常用在传统的网络和数据中心环境。 ### 11. Sidecar 代理 在服务网格架构中,每个服务实例旁边都有一个 sidecar 代理(并不是唯一的形式,还可以扩展到虚拟机、整个主机甚至整个机房)。这个代理负责与其他服务的通信,安全、流量管理等,以及服务的解耦、细粒度的流量控制、服务到服务的安全通信。 ### 12. DNS 代理 DNS 代理在接收到 DNS 查询请求时,会对其进行处理、缓存或转发,加快 DNS 解析速度、增加额外的安全层、内容过滤。 ## 总结 流量管理技术在现代网络和应用的设计中发挥着至关重要的作用,为用户提供快速、稳定和安全的体验。 这些流量管理设施在设计和部署现代网络和应用时都发挥着关键作用,它们可以确保数据的高效、安全和稳定流动。在数字化日益增长的时代,正确地选择和配置这些流量管理工具对于建立高效和安全的 IT 基础架构至关重要。 ### 挑战 使用多种流量管理基础设施、技术栈和配置方式确实为企业提供了很大的灵活性。但同时也代理了一系列的挑战。 - 复杂性增加 - 一致性问题 - 安全风险 - 运维困难 - 学习成本 - 生态集成问题 - 功能冗余重叠 - 版本管理和升级难题 - 成本增加 - 策略和治理不一致 如何应对? ![](https://atbug.oss-cn-hangzhou.aliyuncs.com/2023/10/17/network-infrastructure-with-pipy.png) Flomesh 开源的可编程代理 [Pipy](https://github.com/flomesh-io/pipy)(https://github.com/flomesh-io/pipy),可以通过编程的方式实现前面所有基础设施的功能,提供一站式的流量管理。有兴趣的读者,可以持续关注,我们会在后续的文章中介绍各个场景以及如何使用 Pipy 来实现场景所需的功能。

    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