Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

d5 (#37297)

Francesco Sansalvadorec0af94554514
diff --git a/apps/www/_blog/2025-07-18-persistent-storage-for-faster-edge-functions.mdx b/apps/www/_blog/2025-07-18-persistent-storage-for-faster-edge-functions.mdx
new file mode 100644
index 00000000000..ad80a67b047
--- /dev/null
+++ b/apps/www/_blog/2025-07-18-persistent-storage-for-faster-edge-functions.mdx
@@ -0,0 +1,153 @@
+---
+title: 'Persistent Storage and 97% Faster Cold Starts for Edge Functions'
+description: 'Mount S3-compatible buckets as persistent file storage in Edge Functions with up to 97% faster cold start times.'
+categories:
+ - product
+ - launch-week
+ - edge-functions
+tags:
+ - launch-week
+ - edge-functions
+ - storage
+date: '2025-07-18:00:00'
+toc_depth: 3
+author: laktek,nyannyacha
+image: launch-week-15/day-5-persistent-storage-for-functions/og.jpg
+thumb: launch-week-15/day-5-persistent-storage-for-functions/thumb.png
+launchweek: '15'
+---
+
+Today, we are introducing Persistent Storage and up to 97% faster cold start times for Edge Functions. Previously, Edge Functions only supported ephemeral file storage by writing to `/tmp` directory. Many common libraries for performing tasks, such as zipping/unzipping files and image transformations, are built to work with persistent file storage, so making them work with Edge Functions required extra steps.
+
+The persistent storage option is built on top of the S3 protocol. It allows you to mount any [S3-compatible bucket](https://supabase.com/docs/guides/storage/s3/compatibility), including [Supabase Storage Buckets](https://supabase.com/docs/guides/storage), as a directory for your Edge Functions. You can perform operations such as reading and writing files to the mounted buckets as you would in a POSIX file system.
+
+```tsx
+// read from S3 bucket
+const data = await Deno.readFile('/s3/my-bucket/results.csv')
+
+// make a directory
+await Deno.mkdir('/s3/my-bucket/sub-dir')
+
+// write to S3 bucket
+await Deno.writeTextFile('/s3/my-bucket/demo.txt', 'hello world')
+```
+
+<div className="video-container mb-8">
+ <iframe
+ className="w-full"
+ src="https://www.youtube-nocookie.com/embed/h3mQrDC4g14"
+ title="Persistent Storage and Faster Boot Times for Edge Functions"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
+ allowfullscreen
+ />
+</div>
+
+## How to configure
+
+To access an S3 bucket from Edge Functions, you must set the following as environment variables in Edge Function Secrets.
+
+- `S3FS_ENDPOINT_URL`
+- `S3FS_REGION`
+- `S3FS_ACCESS_KEY_ID`
+- `S3FS_SECRET_ACCESS_KEY`
+
+If you are using Supabase Storage, [follow this guide](https://supabase.com/docs/guides/storage/s3/authentication) to enable and create an access key and id.
+
+## Use Case: SQLite in Edge Functions
+
+The S3 File System simplifies workflows that involve reading and transforming data stored in an S3 bucket.
+
+For example, imagine you are building an IoT app where a device backs up its SQLite database to S3. You can set up a scheduled Edge Function to read this data and then push the data to your primary Postgres database for aggregates and reporting.
+
+```tsx
+// Following example is simplified for readability
+
+import { DB } from "https://deno.land/x/[email protected]/mod.ts";
+import { supabase } from '../shared/client.ts'
+
+const today = new Date().toISOString().split('T')[0]
+const backupDBPath = `backups/backup-${today}.db`
+
+// Use S3 FS to read the Sqlite DB
+const data = Deno.readFileSync(`/s3/${backupDBPath}`);
+
+// Create an in-memory SQLite from the data downloaded from S3
+// This is faster than directly reading from S3
+const db = new DB();
+db.deserialize(data);
+
+function calculateStats(rows: IoTData[], date: string): StatsSummary {
+ // ....
+}
+
+Deno.serve(async (req)=>{
+ // Assuming IoT data is stored in a table called 'sensor_data'
+ const rows = db.queryEntries<IoTData>(`
+ SELECT * FROM sensor_data
+ WHERE date(timestamp) = date('now', 'localtime')
+ `)
+
+ // Calculate statistics
+ const stats = calculateStats(rows, today)
+
+ // Insert stats into Supabase
+ const { data, error } = await supabase
+ .from('iot_daily_stats')
+ .insert([stats])
+
+ return new Response("OK);
+});
+
+```
+
+## 97% Faster Function Boot Times, Even Under Load
+
+Previously, Edge Functions with large dependencies or doing preparation work at the start (e.g., parsing/loading configs, initializing AI models) would incur a noticeable boot delay. Sometimes, these slow neighbors can impact other functions running on the same machine. All JavaScript _workers_ in the Supabase Edge Functions Runtime were cooperatively scheduled on the same [**Tokio thread pool**](https://github.com/tokio-rs/tokio). If one worker had heavy startup logic, such as parsing JavaScript modules or running synchronous operations, it could delay every worker scheduled after. This led to occasional long‑tail latency spikes in high-traffic projects.
+
+To address this issue, we moved workers which are still performing initial script evaluation onto a dedicated blocking pool. This approach prevents heavy initialization tasks from blocking the Tokio thread, significantly reducing boot time spikes for other functions.
+
+### The result
+
+Boot times are now more predictable and wait times for cold starts are now much faster. Here’s a result of a [benchmark](https://github.com/supabase/edge-runtime/blob/develop/k6/specs/mixed.ts) we did to compare boot times before and after these changes.
+
+| Metric | Before | After | (Delta) |
+| ---------------- | ---------- | --------- | --------- |
+| **Avg** | **870 ms** | **42 ms** | **95 %** |
+| **P95** | 8,502 ms | 86 ms | **99 %** |
+| **P99** | 15,069 ms | 460 ms | **97 %** |
+| **Worst** | 24,300 ms | 1 630 ms | **93 %** |
+| **Spikes > 1 s** | 47 % | 4 % | **43 pp** |
+
+## Support for Synchronous APIs
+
+By offloading expensive compute at function boot time onto a separate pool, we were able to enable the use of synchronous File APIs during function boot time. Some libraries only support synchronous File APIs (eg, SQLite), and this would allow you to set them up on Edge Functions before it starts processing requests.
+
+You can now safely use the following synchronous Deno APIs (and their Node counterparts) _during_ initial script evaluation:
+
+- Deno.statSync
+- Deno.removeSync
+- Deno.writeFileSync
+- Deno.writeTextFileSync
+- Deno.readFileSync
+- Deno.readTextFileSync
+- Deno.mkdirSync
+- Deno.makeTempDirSync
+- Deno.readDirSync
+
+**Keep in mind** that the sync APIs are available only during initial script evaluation and aren’t supported in callbacks like HTTP handlers or setTimeout.
+
+```tsx
+Deno.statSync('...') // ✅
+
+setTimeout(() => {
+ Deno.statSync('...') // 💣 ERROR! Deno.statSync is blocklisted on the current context
+})
+
+Deno.serve(() => {
+ Deno.statSync('...') // 💣 ERROR! Deno.statSync is blocklisted on the current context
+})
+```
+
+## Try it on Preview Today
+
+These changes will be rolled out along with the Deno 2 upgrade to all clusters within the next 2 weeks. Meanwhile, you can use the Preview cluster if you'd like to try them out today. Please see [this guide](https://github.com/orgs/supabase/discussions/36814) on how to test your functions in Preview cluster.
diff --git a/apps/www/components/Hero/Hero.tsx b/apps/www/components/Hero/Hero.tsx
index 547659d59bc..470e4e20f2d 100644
--- a/apps/www/components/Hero/Hero.tsx
+++ b/apps/www/components/Hero/Hero.tsx
@@ -19,7 +19,12 @@ const Hero = () => {
<AnnouncementBadge
url="/launch-week#main-stage"
badge="LW15"
- announcement={`Day 4: ${announcement.launch}`}
+ announcement={
+ <>
+ <span className="hidden md:inline">Day 5: </span>
+ {announcement.launch}
+ </>
+ }
className="lg:-mt-8 mb-4 lg:mb-0"
hasArrow
/>
diff --git a/apps/www/components/LaunchWeek/15/LW15MainStage.tsx b/apps/www/components/LaunchWeek/15/LW15MainStage.tsx
index be528639563..c366ef1eb82 100644
--- a/apps/www/components/LaunchWeek/15/LW15MainStage.tsx
+++ b/apps/www/components/LaunchWeek/15/LW15MainStage.tsx
@@ -198,7 +198,7 @@ const CardsSlider: React.FC<Props> = ({
ref={swiperRef}
onSwiper={setControlledSwiper}
modules={[Controller, Navigation, A11y]}
- initialSlide={3}
+ initialSlide={4}
spaceBetween={8}
slidesPerView={1.5}
breakpoints={{
diff --git a/apps/www/components/LaunchWeek/15/data/lw15_data.tsx b/apps/www/components/LaunchWeek/15/data/lw15_data.tsx
index f1f32dc2a2e..977ae334faf 100644
--- a/apps/www/components/LaunchWeek/15/data/lw15_data.tsx
+++ b/apps/www/components/LaunchWeek/15/data/lw15_data.tsx
@@ -54,7 +54,7 @@ export interface WeekDayProps {
steps: StepProps[] | []
}
-export const endOfLW13Hackathon = '2025-04-04T23:59:59.999-08:00'
+export const endOfLW13Hackathon = '2025-07-04T23:59:59.999-08:00'
const days: (isDark?: boolean) => WeekDayProps[] = (isDark = true) => [
{
@@ -66,7 +66,7 @@ const days: (isDark?: boolean) => WeekDayProps[] = (isDark = true) => [
hasCountdown: false,
blog: '/blog/jwt-signing-keys',
date: 'Monday',
- published_at: '2025-03-31T07:00:00.000-07:00',
+ published_at: '2025-07-14T07:00:00.000-07:00',
title: 'Introducing JWT Signing Keys',
description: '',
links: [
@@ -97,7 +97,7 @@ const days: (isDark?: boolean) => WeekDayProps[] = (isDark = true) => [
hasCountdown: false,
blog: '/blog/analytics-buckets',
date: 'Tuesday',
- published_at: '2025-04-01T07:00:00.000-07:00',
+ published_at: '2025-07-15T07:00:00.000-07:00',
title: 'Introducing Supabase Analytics Buckets with Iceberg Support',
description: '',
links: [
@@ -128,7 +128,7 @@ const days: (isDark?: boolean) => WeekDayProps[] = (isDark = true) => [
hasCountdown: false,
blog: '/blog/branching-2-0',
date: 'Wednesday',
- published_at: '2025-04-02T07:00:00.000-07:00',
+ published_at: '2025-07-16T07:00:00.000-07:00',
title: 'Introducing Branching 2.0',
description: '',
links: [
@@ -155,11 +155,11 @@ const days: (isDark?: boolean) => WeekDayProps[] = (isDark = true) => [
d: 4,
dd: 'Thu',
shipped: true,
- isToday: true,
+ isToday: false,
hasCountdown: false,
blog: '/blog/new-observability-features-in-supabase',
date: 'Thursday',
- published_at: '2025-04-03T07:00:00.000-07:00',
+ published_at: '2025-07-17T07:00:00.000-07:00',
title: 'Introducing New Observability Features in Supabase',
description: '',
links: [
@@ -185,23 +185,23 @@ const days: (isDark?: boolean) => WeekDayProps[] = (isDark = true) => [
id: 'day-5',
d: 5,
dd: 'Fri',
- shipped: false,
- isToday: false,
+ shipped: true,
+ isToday: true,
hasCountdown: false,
- blog: '/blog/',
+ blog: '/blog/persistent-storage-for-faster-edge-functions',
date: 'Friday',
- published_at: '2025-04-04T07:00:00.000-07:00',
- title: '',
+ published_at: '2025-07-18T07:00:00.000-07:00',
+ title: 'Introducing Persistent Storage for Edge Functions',
description: '',
links: [
{
type: 'video',
- href: '',
+ href: 'h3mQrDC4g14',
+ },
+ {
+ type: 'xSpace',
+ href: 'https://x.com/i/spaces/1jMJgkeNXAbJL',
},
- // {
- // type: 'xSpace',
- // href: 'https://twitter.com/i/spaces/',
- // },
],
steps: [
{
diff --git a/apps/www/public/images/blog/launch-week-15/day-5-persistent-storage-for-functions/og.png b/apps/www/public/images/blog/launch-week-15/day-5-persistent-storage-for-functions/og.png
new file mode 100644
index 00000000000..acd167aacfb
Binary files /dev/null and b/apps/www/public/images/blog/launch-week-15/day-5-persistent-storage-for-functions/og.png differ
diff --git a/apps/www/public/images/blog/launch-week-15/day-5-persistent-storage-for-functions/thumb.png b/apps/www/public/images/blog/launch-week-15/day-5-persistent-storage-for-functions/thumb.png
new file mode 100644
index 00000000000..c83534509da
Binary files /dev/null and b/apps/www/public/images/blog/launch-week-15/day-5-persistent-storage-for-functions/thumb.png differ
diff --git a/apps/www/public/rss.xml b/apps/www/public/rss.xml
index aee1d2e2032..bfd1b14f68c 100644
--- a/apps/www/public/rss.xml
+++ b/apps/www/public/rss.xml
@@ -5,9 +5,16 @@
<link>https://supabase.com</link>
<description>Latest news from Supabase</description>
<language>en</language>
- <lastBuildDate>Thu, 17 Jul 2025 00:00:00 -0700</lastBuildDate>
+ <lastBuildDate>Fri, 18 Jul 2025 00:00:00 -0700</lastBuildDate>
<atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/>
<item>
+ <guid>https://supabase.com/blog/persistent-storage-for-faster-edge-functions</guid>
+ <title>Persistent Storage and 97% Faster Cold Starts for Edge Functions</title>
+ <link>https://supabase.com/blog/persistent-storage-for-faster-edge-functions</link>
+ <description>Mount S3-compatible buckets as persistent file storage in Edge Functions with up to 97% faster cold start times.</description>
+ <pubDate>Fri, 18 Jul 2025 00:00:00 -0700</pubDate>
+</item>
+<item>
<guid>https://supabase.com/blog/algolia-connector-for-supabase</guid>
<title>Algolia Connector for Supabase</title>
<link>https://supabase.com/blog/algolia-connector-for-supabase</link>
@@ -252,20 +259,6 @@
<description>Technical deep dive into the new DBOS integration for Supabase</description>
<pubDate>Tue, 10 Dec 2024 00:00:00 -0700</pubDate>
</item>
-<item>
- <guid>https://supabase.com/blog/database-build-v2</guid>
- <title>database.build v2: Bring-your-own-LLM</title>
- <link>https://supabase.com/blog/database-build-v2</link>
- <description>Use any OpenAI API compatible LLMs in database.build</description>
- <pubDate>Fri, 06 Dec 2024 00:00:00 -0700</pubDate>
-</item>
-<item>
- <guid>https://supabase.com/blog/restore-to-a-new-project</guid>
- <title>Restore to a New Project</title>
- <link>https://supabase.com/blog/restore-to-a-new-project</link>
- <description>Effortlessly Clone Data into a New Supabase Project</description>
- <pubDate>Fri, 06 Dec 2024 00:00:00 -0700</pubDate>
-</item>
<item>
<guid>https://supabase.com/blog/hack-the-base</guid>
<title>Hack the Base! with Supabase</title>
@@ -280,6 +273,20 @@
<description>Highlights from Launch Week 13</description>
<pubDate>Fri, 06 Dec 2024 00:00:00 -0700</pubDate>
</item>
+<item>
+ <guid>https://supabase.com/blog/database-build-v2</guid>
+ <title>database.build v2: Bring-your-own-LLM</title>
+ <link>https://supabase.com/blog/database-build-v2</link>
+ <description>Use any OpenAI API compatible LLMs in database.build</description>
+ <pubDate>Fri, 06 Dec 2024 00:00:00 -0700</pubDate>
+</item>
+<item>
+ <guid>https://supabase.com/blog/restore-to-a-new-project</guid>
+ <title>Restore to a New Project</title>
+ <link>https://supabase.com/blog/restore-to-a-new-project</link>
+ <description>Effortlessly Clone Data into a New Supabase Project</description>
+ <pubDate>Fri, 06 Dec 2024 00:00:00 -0700</pubDate>
+</item>
<item>
<guid>https://supabase.com/blog/supabase-queues</guid>
<title>Supabase Queues</title>
diff --git a/packages/ui-patterns/src/Banners/data.json b/packages/ui-patterns/src/Banners/data.json
index f426df2e8d5..ab01eb3abaf 100644
--- a/packages/ui-patterns/src/Banners/data.json
+++ b/packages/ui-patterns/src/Banners/data.json
@@ -1,6 +1,6 @@
{
- "text": "LW15: Day 4",
- "launch": "New Observability Features",
+ "text": "LW15: Day 5",
+ "launch": "Persistent Storage for Edge Functions",
"launchDate": "2025-07-17T08:00:00.000-07:00",
"link": "/launch-week#main-stage",
"cta": "Learn more"