Skip to content

Commit

Permalink
Minor documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mbklein committed May 21, 2024
1 parent 0a6891a commit 348ac1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions docs/pages/docs/notes.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Notes

Lambda Function URLs have a payload (request/response body) size limit of approximately 6MB in both directions. To overcome this limitation, the Lambda URL is configured behind an AWS CloudFront distribution with two origins - the API and a cache bucket. Responses larger than 6MB are saved to the cache bucket at the same relative path as the request, and the Lambda returns a `404 Not Found` response to CloudFront. CloudFront then fails over to the second origin (the cache bucket), where it finds the actual response and returns it.

The cache bucket uses an S3 lifecycle rule to expire cached responses in 1 day.
`serverless-iiif` takes advantage of AWS Lambda URLs' [streaming response](https://aws.amazon.com/blogs/compute/introducing-aws-lambda-response-streaming/) functionality to overcome the 6MB response limit that previous versions were subject to. Instead of a hard limit of 6MB, there is now a soft limit of approximately 20MB for each response. This limit can be adjusted by opening a support ticket with AWS requesting a quota increase. In addition, the streaming rate for the first 6MB of each response is uncapped; data over 6MB is capped at 2MB/s.
4 changes: 4 additions & 0 deletions docs/pages/docs/source-images.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Some versions of `libvips` and `libjpeg` have an issue with JPEG-compressed pyra
alpha channels). If you find that `serverless-iiif` returns an error for an image request or isn't rendering as you'd expect, try removing any additional channels beyond red, green, and blue.
</Callout>

## Image Metadata

`serverless-iiif` will probe each source image for its dimensions before any other processing takes place. Because this process can be time consuming, especially for large files, `serverless-iiif` first looks for fields calls `x-amz-meta-width` and `x-amz-meta-height` in the source file's [S3 Object Metadata](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html) before trying to load dimensions from the image itself. If those properties are present, they will be used instead.

## Creating tiled TIFFs

### Using the VIPS command line
Expand Down

0 comments on commit 348ac1a

Please sign in to comment.