V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
爱意满满的作品展示区。
sajesemuy

高性能缓存服务器 nuster v3.0.0.19 发布,支持硬盘持久化

  •  
  •   sajesemuy ·
    jiangwenyuan · Jul 31, 2019 · 2317 views
    This topic created in 2474 days ago, the information mentioned may be changed or developed.

    nuster 是一个基于 HAProxy 的高性能 HTTP 缓存服务器和 RESTful NoSQL 缓存服务器,既可以用作类似 Varnish 或者 Nginx 那样的 HTTP 缓存服务器,来缓存动态或者静态的 HTTP 资源,也可以用作 RESTful NoSQL 缓存服务器, 用 HTTP POST/GET/DELETE 来 添加 /取得 /删除 Key/Value。

    https://github.com/jiangwenyuan/nuster

    本次更新主要添加对硬盘持久化的支持

    支持四种持久模式

    • off: 默认模式,仅保存在内存
    • only: 不保存在内存,仅保存在硬盘
    • sync: 保存到内存和硬盘后返回给客户端
    • async: 保存到内存后立即换回给客户的,内存数据会由 master 进程在一定时间后保存至硬盘

    比如

    global
        master-worker
        nuster cache on data-size 10m dir /tmp/cache
        nuster nosql on data-size 10m dir /tmp/nosql
    backend be
        nuster cache on
        nuster rule off   disk off   ttl 1m if { path_beg /disk-off }
        nuster rule only  disk only  ttl 1d if { path_beg /disk-only }
        nuster rule sync  disk sync  ttl 1h if { path_beg /disk-sync }
        nuster rule async disk async ttl 2h if { path_beg /disk-async }
        nuster rule others ttl 100
    
    1. /disk-off 仅保存在内存
    2. /disk-only 仅保存在硬盘
    3. /disk-sync 保存至内存和硬盘后返回给客户端
    4. /disk-async 保存至内存后立即换回给客户端,内存数据会在一定时间后被缓存至硬盘
    5. 其他的所有请求都仅保存在内存
    2 replies    2019-08-03 18:48:30 +08:00
    nvioue
        1
    nvioue  
       Aug 1, 2019
    存储用的什么实现?
    sajesemuy
        2
    sajesemuy  
    OP
       Aug 3, 2019
    @nvioue file
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1371 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 17:22 · PVG 01:22 · LAX 10:22 · JFK 13:22
    ♥ Do have faith in what you're doing.