Nuster is a high-performance HTTP cache server and RESTful NoSQL cache server based on HAProxy. It can be used as an HTTP cache server such as Varnish or Nginx to cache dynamic or static HTTP resources. It can also be used as a RESTful NoSQL cache server to add/obtain /DELETE keys/values using HTTP POST/GET/DELETE.

Github.com/jiangwenyua…

This update adds support for hard disk persistence

Four persistence modes are supported

  • Off: the default mode is saved only in memory
  • Only: not in the memory but in the hard disk
  • Sync: Saves the data to the memory or hard disk and returns the data to the client
  • Async: data saved to the memory is immediately returned to the customer. The memory data is saved to the hard disk by the master process after a certain period of time

The configuration file

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
Copy the code
  1. /disk-offOnly stored in memory
  2. /disk-onlySave only on hard disk
  3. /disk-syncSave the data to the memory and hard disk and return the data to the client
  4. /disk-asyncAfter the data is saved to the memory, it is immediately returned to the client. The memory data will be cached to hard disks after a certain period of time
  5. All other requests are kept in memory only