Distributions
› Ubuntu
› Fedora
› CentOS
中文资源站
› 网易开源镜像站
Feiox
V2EX  ›  Linux

Linux 下如何在 API 层面上进行负载均衡?

  •  
  •   Feiox ·
    iceice · Jun 4, 2015 · 3846 views
    This topic created in 4189 days ago, the information mentioned may be changed or developed.

    不要太重型的武器 ~
    就是类似以下这种:

    • POST /user -> server01
    • GET /user/1001 -> server02

    最好是效率好点的,如果一般的解决,写个 Flask 手工转发一下也可以。
    使用 Nginx 可以吗?
    如果使用 Node.js 或者 Tornade with PyPy 是不是效率损失很小?

    6 replies  •  2015-06-04 15:17:00 +08:00
    liwei
    liwei
    Jun 4, 2015
    1
    这跟Linux有什么关系
    wy315700
    wy315700
    Jun 4, 2015
    2
    nginx
    haproxy
    bjzhush
    bjzhush
    Jun 4, 2015
    3
    nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP proxy server, originally written by Igor Sysoev.
    ---摘自 http://nginx.org/en/
    024680
    024680
    Jun 4, 2015
    4
    使用Nginx就可以了,定义location即可
    DjvuLee
    DjvuLee
    Jun 4, 2015
    5
    我感觉楼主提到的东西和你要解决的问题不沾边了。

    nginx和haproxy都可以的。
    wdlth
    wdlth
    Jun 4, 2015
    6
    Squid、Nginx、HAProxy、Varnish、ATS,很多反向代理都能做到这样。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5022 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 01:52 · PVG 09:52 · LAX 17:52 · JFK 20:52
    ♥ Do have faith in what you're doing.