Skip to content

Commit ce2039e

Browse files
committed
Tiering doc
1 parent 8205d2a commit ce2039e

File tree

3 files changed

+96
-0
lines changed

3 files changed

+96
-0
lines changed

docs/buckets/create-bucket.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ to a bucket.
1212
Buckets and the objects in them are private and can be accessed only via access
1313
keys that you explicitly grant access permissions to.
1414

15+
## Setting bucket tier
16+
17+
When bucket created in the web console, you can set the default object tier for
18+
all objects uploaded to it. For more information, see the
19+
[Tiers](../objects/tiers.md) guide.
20+
1521
## Creating a bucket using flyctl
1622

1723
To create a bucket for one of your Fly apps, run the following command in the

docs/objects/tiers.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Object storage tiers
2+
3+
Tigris offers object storage tiers to optimize storage costs based on the access
4+
patterns of your data. There are three storage tiers available:
5+
6+
- Standard
7+
- Infrequent Access
8+
- Archive
9+
10+
## Standard tier
11+
12+
The default storage class. It provides high durability, availability, and
13+
performance for frequently accessed data.
14+
15+
## Infrequent Access tier
16+
17+
Lower-cost storage for data that is accessed less frequently but requires rapid
18+
access when needed.
19+
20+
## Archive tier
21+
22+
Low-cost storage for data archiving. Long-term data archiving with infrequent
23+
access. The data is not immediately available for access and requires restoration
24+
before it can be accessed. Restoration time is about 1 hour.
25+
26+
## Setting object tier
27+
28+
The default tier for all objects stored in a particular bucket can be specified in the
29+
[bucket configuration](../buckets/create-bucket.md#setting-bucket-tier) during bucket creation time.
30+
If no tier is provided at bucket creation time, it defaults to Standard.
31+
32+
Object tier can also be set at the object creation time.
33+
This overrides the tier specified in the bucket configuration. To set the object tier, use the `--storage-class` flag with the
34+
`put-object` AWS CLI or corresponding field of PutObject, CreateMultipartUpload
35+
SDK APIs input. REST API users can set the `x-amz-storage-class` header.
36+
37+
Tigris accepts S3 compatible storage classes:
38+
39+
- STANDARD - for standard
40+
- STANDARD_IA - for infrequent access
41+
- GLACIER - for archive
42+
43+
### Example with AWS CLI
44+
45+
```bash
46+
aws s3api put-object --bucket my-bucket --key my-object.txt --body bar.txt --storage-class STANDARD_IA
47+
```
48+
49+
### Example with REST API
50+
51+
```http
52+
PUT /my-object.txt HTTP/1.1
53+
Host: my-bucket.storage.fly.tigris.dev
54+
x-amz-storage-class:STANDARD_IA
55+
```
56+
57+
## Restoring objects from Archive tier
58+
59+
Objects written to the Archive storage class are not immediately available for
60+
access. Get requests for objects in the Archive storage class will return 403
61+
(InvalidObjectState) error. To restore objects from the Archive storage class,
62+
initiate a restore request.
63+
64+
### Initiate restore request
65+
66+
```bash
67+
aws s3api restore-object --bucket my-bucket --key 'my-archive-object.txt' --restore-request Days=3
68+
```
69+
70+
The `Days` parameter specifies the number of days the restored object will be
71+
available for access. After the specified number of days, the object will be
72+
moved back to the Archive storage class.
73+
74+
### Check restore status
75+
76+
```bash
77+
aws s3api head-object --bucket my-bucket --key 'my-archive-object.txt'
78+
```
79+
80+
Ongoing restore requests will have the `Restore: ongoing-request="true"` header
81+
in the response. Once the restore is complete, the `Restore` header will contain
82+
the expiry date when the object will be moved back to the Archive storage class:
83+
84+
```bash
85+
{
86+
"Restore": "ongoing-request=\"false\" expiry-date=\"Fri, 01 Nov 2024 02:00:00 GMT\"",
87+
"StorageClass": "GLACIER"
88+
}
89+
```

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ const sidebars = {
7575
"objects/upload-via-html-form",
7676
"objects/access-objects-via-cookies",
7777
"objects/acl",
78+
"objects/tiers",
7879
],
7980
},
8081
{

0 commit comments

Comments
 (0)