liuxu
V2EX  ›  Rust

用 rust 框架 axum 写了个 todo demo,即使用 1C1G 的服务器,性能压测 QPS 也很优异

  •  
  •   liuxu · Oct 22, 2022 · 2757 views
    This topic created in 1296 days ago, the information mentioned may be changed or developed.
    框架:axum + tokio-postgres + postgresql-15

    服务器配置:1c1g ,15g ssd
    cpu:intel gold 6148
    ssd 4k iops:20k
    ssd 64k iops:16k

    压测参数:1k 并发,10k 总请求数
    压测结果:
    helloworld: qps 9.4k ,latency 152ms 100%
    create: qps 5.8k ,latency 260ms 100%
    list 10 rows: qps 6.6k ,latency 218ms 100%
    get: qps 6.5k ,latency 241ms 100%

    todo 项目地址: https://github.com/liuquanhao/axum-todo


    这是服务器配置:



    这是 helloworld:



    这是 create:



    这是 list 10 行数据:



    这是 get 1 行数据:
    wsseo
        1
    wsseo  
       Oct 29, 2022
    应该搞个对比,更直观
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   867 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 20:22 · PVG 04:22 · LAX 13:22 · JFK 16:22
    ♥ Do have faith in what you're doing.