Merge pull request #10916 from supabase/fix-images-2

This commit is contained in:
Inian authored and GitHub committed 2022-12-13 22:35:25 +08:00
commit 988f75f952
8 files changed
+4 -4

No files matched your search

@@ -143,7 +143,7 @@ Let's imagine one of your users makes a request for a resized cat (kitten?) imag
The cat image goes viral, and so now multiple users want to see the resized image.
![Cache hit flow](/images/blog/launch-week-6/day-2-storage-resize/cache%20hit.jpg)
![Cache hit flow](/images/blog/launch-week-6/day-2-storage-resize/cache-hit.png)
1. The request hits our globally-distributed API Gateway. This gateway reads the image metadata from a global KV store.
2. Using the Cache Key the Gateway tries to find a cached object in our CDN. Because this image has already been resized, it returns it directly from the cache.
@@ -154,7 +154,7 @@ To complete this architecture, we need to keep the global KV store (which stores
Using our cat picture from above:
![Cache refresh flow](/images/blog/launch-week-6/day-2-storage-resize/cache%20refresh.jpg)
![Cache refresh flow](/images/blog/launch-week-6/day-2-storage-resize/cache-refresh.png)
1. You update the cat picture to a dog picture. This triggers an `ObjectCreated:Put` event from the Supabase Storage server.
2. A cache manager service subscribes to these events and updates the global metadata store with the new Etag. This takes around 60 seconds to propagate globally.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 87 KiB

+2 -2
View File
@@ -8,9 +8,9 @@
<lastBuildDate>Mon, 12 Dec 2022 16:04:00 +0000</lastBuildDate>
<atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/>
<item>
<guid>https://supabase.com/blog/storage-image-reising-smart-cdn</guid>
<guid>https://supabase.com/blog/storage-image-resizing-smart-cdn</guid>
<title>Supabase Storage v2: Image resizing and Smart CDN</title>
<link>https://supabase.com/blog/storage-image-reising-smart-cdn</link>
<link>https://supabase.com/blog/storage-image-resizing-smart-cdn</link>
<description>We're introducing new features for Supabase Storage: Image resizing and a Smart CDN.</description>
<pubDate>Mon, 12 Dec 2022 16:04:00 +0000</pubDate>
</item>