-
Notifications
You must be signed in to change notification settings - Fork 157
Open
Description
Describe the bug
Using the latest Docker image, no data is being cached.
To Reproduce
Steps to reproduce the behavior:
- Start container
docker run --rm -ti -p 80:80 -e S3_SERVER=storage.googleapis.com -e S3_ACCESS_KEY_ID="<key>" -e S3_SECRET_KEY="<secret>" --env-file s3.env nginxinc/nginx-s3-gateway:latest-20221026
s3.env file:
S3_BUCKET_NAME=<bucket-name>
S3_SERVER_PORT=443
S3_SERVER_PROTO=https
S3_REGION=us-east-1
S3_STYLE=virtual
S3_DEBUG=false
AWS_SIGS_VERSION=4
ALLOW_DIRECTORY_LIST=true
PROVIDE_INDEX_PAGE=false
APPEND_SLASH_FOR_POSSIBLE_DIRECTORY=false
PROXY_CACHE_VALID_OK=1h
PROXY_CACHE_VALID_NOTFOUND=1m
PROXY_CACHE_VALID_FORBIDDEN=30s
- Pull multiple files from the S3 gateway at http://localhost
I can successfully browse the S3 bucket directory structure and download objects without any issue.
Although, when downloading the same object multiple times I cannot see any performance increase from a cache hit.
- Exec into container
docker exec -ti <container> bash
Run the following command:
ls -la /var/cache/nginx/s3_proxy/
The cache directory is empty.
I also looked for looked for any disk usage increase with the command du -sh /* but no cached data is being stored in the container.
Expected behavior
According to the documentation, data should be cached when accessed multiple times and not reloaded from the remote S3 bucket at each access.
Your environment
- Version of the container used (if downloaded from Docker Hub or Github)
Docker image: nginxinc/nginx-s3-gateway:latest-20221026 - S3 backend implementation you are using (AWS, Ceph, NetApp StorageGrid, etc)
Google Cloud Storage - How you are deploying Docker/Stand-alone, etc
Docker on MacOS using Rancher Desktop. - Authentication method (IAM, IAM with Fargate, IAM with K8S, AWS Credentials, etc)
S3 authentication using Google Service Account with HMAC keys.
Metadata
Metadata
Assignees
Labels
No labels