gonzalo
gonzalo

Reputation: 387

Best practices to diagnose a object storage health check

I'm programming a health-check for a microservice that relies in a object storage (minio).

My approach to diagnose if the object-storage is healthy is to call: bucketExists function, validating that the bucket exists and I have stable connection to it.

Since is checked every 1 second I need this call to be efficient and have a light workload. Here are the functions that minio have: Minio Javascript SDK

My question is: Is correct to use this function as a health-check? There is a best practice way to do this?

Thanks in advance for reading my question :-)

Upvotes: 0

Views: 904

Answers (1)

Manik Taneja
Manik Taneja

Reputation: 114

Any idempotent operation(BucketHead, ListBuckets, ListObjects etc) can be used for checking the health of the service. A BucketExists operation may return correctly with a bucket not found error. So make sure you can differentiate between that and the end-point not being reachable. If you don't have a large number of buckets then the ListBuckets API is the easiest.

There is also the Minio Admin API package that provides APIs for managing and querying a minio deployment : https://github.com/minio/minio/tree/master/pkg/madmin , however this seems to be only available in Go.

Upvotes: 1

Related Questions