feat: bring new HDD related performance enhancements (#18239)

Optionally allows customers to enable 

- Enable an external cache to catch GET/HEAD responses 
- Enable skipping disks that are slow to respond in GET/HEAD 
  when we have already achieved a quorum
This commit is contained in:
Harshavardhana
2023-11-22 13:46:17 -08:00
committed by GitHub
parent a93214ea63
commit fba883839d
26 changed files with 2294 additions and 251 deletions
+13
View File
@@ -20,6 +20,7 @@ package cmd
import (
"io"
"math"
"net/http"
"time"
"github.com/dustin/go-humanize"
@@ -149,6 +150,9 @@ type ObjectInfo struct {
// Date and time at which the object is no longer able to be cached
Expires time.Time
// Cache-Control - Specifies caching behavior along the request/reply chain
CacheControl string
// Specify object storage class
StorageClass string
@@ -200,6 +204,15 @@ type ObjectInfo struct {
ParityBlocks int
}
// ExpiresStr returns a stringified version of Expires header in http.TimeFormat
func (o ObjectInfo) ExpiresStr() string {
var expires string
if !o.Expires.IsZero() {
expires = o.Expires.UTC().Format(http.TimeFormat)
}
return expires
}
// ArchiveInfo returns any saved zip archive meta information.
// It will be decrypted if needed.
func (o *ObjectInfo) ArchiveInfo() []byte {