This PR adds disk based edge caching support for minio server. Cache settings can be configured in config.json to take list of disk drives, cache expiry in days and file patterns to exclude from cache or via environment variables MINIO_CACHE_DRIVES, MINIO_CACHE_EXCLUDE and MINIO_CACHE_EXPIRY Design assumes that Atime support is enabled and the list of cache drives is fixed. - Objects are cached on both GET and PUT/POST operations. - Expiry is used as hint to evict older entries from cache, or if 80% of cache capacity is filled. - When object storage backend is down, GET, LIST and HEAD operations fetch object seamlessly from cache. Current Limitations - Bucket policies are not cached, so anonymous operations are not supported in offline mode. - Objects are distributed using deterministic hashing among list of cache drives specified.If one or more drives go offline, or cache drive configuration is altered - performance could degrade to linear lookup. Fixes #4026
123 lines
3.4 KiB
JSON
123 lines
3.4 KiB
JSON
{
|
|
"version": "22",
|
|
"credential": {
|
|
"accessKey": "USWUXHGYZQYFYFFIT3RE",
|
|
"secretKey": "MOJRH0mkL1IPauahWITSVvyDrQbEEIwljvmxdq03"
|
|
},
|
|
"region": "us-east-1",
|
|
"browser": "on",
|
|
"domain": "",
|
|
"storageclass": {
|
|
"standard": "",
|
|
"rrs": ""
|
|
},
|
|
"cache": {
|
|
"drives": [],
|
|
"expiry": 90,
|
|
"exclude": []
|
|
},
|
|
"notify": {
|
|
"amqp": {
|
|
"1": {
|
|
"enable": true,
|
|
"url": "amqp://myuser:mypassword@localhost:5672",
|
|
"exchange": "bucketevents",
|
|
"routingKey": "bucketlogs",
|
|
"exchangeType": "fanout",
|
|
"deliveryMode": 0,
|
|
"mandatory": false,
|
|
"immediate": false,
|
|
"durable": false,
|
|
"internal": false,
|
|
"noWait": false,
|
|
"autoDeleted": false
|
|
}
|
|
},
|
|
"nats": {
|
|
"1": {
|
|
"enable": true,
|
|
"address": "0.0.0.0:4222",
|
|
"subject": "bucketevents",
|
|
"username": "yourusername",
|
|
"password": "yoursecret",
|
|
"token": "",
|
|
"secure": false,
|
|
"pingInterval": 0,
|
|
"streaming": {
|
|
"enable": false,
|
|
"clusterID": "",
|
|
"clientID": "",
|
|
"async": false,
|
|
"maxPubAcksInflight": 0
|
|
}
|
|
}
|
|
},
|
|
"elasticsearch": {
|
|
"1": {
|
|
"enable": true,
|
|
"format": "namespace",
|
|
"url": "http://127.0.0.1:9200",
|
|
"index": "bucketevents"
|
|
}
|
|
},
|
|
"redis": {
|
|
"1": {
|
|
"enable": true,
|
|
"format": "namespace",
|
|
"address": "127.0.0.1:6379",
|
|
"password": "yoursecret",
|
|
"key": "bucketevents"
|
|
}
|
|
},
|
|
"postgresql": {
|
|
"1": {
|
|
"enable": true,
|
|
"format": "namespace",
|
|
"connectionString": "",
|
|
"table": "bucketevents",
|
|
"host": "127.0.0.1",
|
|
"port": "5432",
|
|
"user": "postgres",
|
|
"password": "mypassword",
|
|
"database": "bucketevents_db"
|
|
}
|
|
},
|
|
"kafka": {
|
|
"1": {
|
|
"enable": true,
|
|
"brokers": ["localhost:9092"],
|
|
"topic": "bucketevents"
|
|
}
|
|
},
|
|
"webhook": {
|
|
"1": {
|
|
"enable": true,
|
|
"endpoint": "http://requestb.in/1525x9n1"
|
|
}
|
|
},
|
|
"mysql": {
|
|
"1": {
|
|
"enable": true,
|
|
"format": "namespace",
|
|
"dsnString": "",
|
|
"table": "minio_images",
|
|
"host": "172.17.0.1",
|
|
"port": "3306",
|
|
"user": "root",
|
|
"password": "password",
|
|
"database": "miniodb"
|
|
}
|
|
},
|
|
"mqtt": {
|
|
"1": {
|
|
"enable": false,
|
|
"broker": "tcp://localhost:1883",
|
|
"topic": "minio",
|
|
"qos": 1,
|
|
"clientId": "minio",
|
|
"username": "",
|
|
"password": ""
|
|
}
|
|
}
|
|
}
|
|
} |