Vercel Launches 3 New Storage Options for Your Next Project!
Tags: database, vercel, programming
Published: 2023-05-16 14:10:20

---
title: Vercel Launches 3 New Storage Options for Your Next Project!
published: true
description: Looking for the latest and greatest in storage solutions? Look no further than Vercel's newest offerings! With 3 new options to choose from.
date: 2023-05-16 13:44:21 UTC
tags: #databases #vercel #programming
canonical_url: https://blog.akashrchandran.in/vercel-launches-3-new-storage-options-for-your-next-project
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c6xegtjui667i2rkpinh.png
---

If you have tried manually deploying apps to production, then you may know how nerve-wracking things can be. Even the slightest mistake could cause the production database to be deleted, leading the company to lose billions of dollars, making you freak out and flee the country before your boss finds out, and start living in the Himalayas as a goat farmer.

![A simple gif](https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExODlhZjk3YWQzZGUzYzU2MGU0YzA1NjRiMzliYTIyYTNjOWU3Y2JjOCZlcD12MV9pbnRlcm5hbF9naWZzX2dpZklkJmN0PWc/3o7TKFy1gaoy1JNqZG/giphy.gif)

That's why most of the developers use Vercel, Netlify, Heroku, and Firebase as they handle deployment for you and prevent you from making any big mistakes. Anyways vercel just introduced 3 new databases or storage options. And let's see them in brief.

## What is vercel?

Well, Vercel is a cloud platform which enables developers to host their websites and web apps that deploy and scale automatically. Vercel is the favourite choice for the deployment of Next.js apps as they have more efficient support for the framework. That's not that big as vercel also maintains the Next.js.

But the best part is that they support almost every language framework though they specialize in javascript frameworks. I have hosted many Python frameworks like Flask, FastAPI and even Django. They even support PHP, I have hosted my app there and haven't got any issues with speed or rendering.

They have a crazy awesome user interface and experience that makes it so user-friendly. It provides a free tier named `Hobby` for developers to experiment and try their platform. Its against Vercels TOS to run a commercial app on the free tier. Even though you technically could, they will shut down your site if caught in violation. So you'll have to go with a paid plan and it's a bit expensive when compared to other platforms.

## Introduction

Vercel introduced 3 new additions to their storage solutions. They did it on 1st May and you can find the announcement on the [website](https://vercel.com/blog/vercel-storage). The new additions are:

- [Vercel KV](https://vercel.com/blog/vercel-storage#vercel-kv-a-durable-redis-database) (Beta)

- [Vercel Postgres](https://vercel.com/blog/vercel-storage#vercel-postgres-complex-data-made-easy) (Beta)

- [Vercel Blob](https://vercel.com/blog/vercel-storage#vercel-blob-easy-file-storage-at-the-edge) (Private Beta)

We will be talking about them individually one by one below. This is a huge thing as they are trying to control users from using any other third-party database solution and managing it themselves. The database was the only thing missing on vercel but now it's kind of complete at least it is in beta for public use. They are not yet available for enterprise usage, mostly they will be available soon.

[https://www.youtube.com/watch?v=gA8cHj3w5XI&ab\_channel=Vercel](https://www.youtube.com/watch?v=gA8cHj3w5XI&ab_channel=Vercel)

## Vercel KV

It's key-value storage like Redis, in fact exactly like Redis as it is powered by Upstash. If you didn't know Upstash is a **Serverless in-memory cloud database** from Upstash Inc, a California-based company. It is a Serverless Redis Service. It can be used for caching layer or as a database. You can more details about it [here](https://vercel.com/storage/kv).

![oh and it's really fast](https://cdn.hashnode.com/res/hashnode/image/upload/v1684212956158/c38839ce-7fb7-4db3-bff4-69e01b854ab8.gif)

For now, I am more interested in the speed at which it works, let's try to create a simple free tier vercel KV storage. The creation is pretty straightforward, they just ask you for the name and the region. I went with Singapore as my region, as it seems to be the nearest one.

![creating vercel kv](https://cdn.hashnode.com/res/hashnode/image/upload/v1684177607628/ee420bfe-7b58-49fc-937d-8425f1343e0e.png)

> They also provide CLI to set and get values directly from the database.

I copied the Template that they provide for the testing, you can get the template source on [GitHub](https://github.com/vercel/examples/tree/main/storage/kv-redis-starter). I modified its `page.tsx` file just to set and get a value from the database.

```
import kv from "@vercel/kv"

export default async function Home() {
  console.time("res");
  await kv.set("message", "Hello World!");
  const msg = await kv.get("message");
  console.timeEnd("res");
  return <p>{msg}</p>;
}

```

When I first ran it took more than `200 ms` to load, as it was the first request server took time to warm up and respond. Even 2nd and 3rd try still resulted in more than `100 ms`, but after that, it came down under to `25 - 50 ms` range.

> Keep in mind that this was both reading and writing. But when I tested reading from the database alone it was a little above `15 ms`.

The storage supports all the operations that can be done on Redis. There are limitations applied on creation, requests, record size etc you can find them [here](https://vercel.com/docs/storage/vercel-kv/limits). The pricing seems to be a little above the expected but it may drop in the future.

[![pricing](https://cdn.hashnode.com/res/hashnode/image/upload/v1684180919754/388f1031-64dc-4ed3-806e-48002bf7b539.png)](https://vercel.com/docs/storage/vercel-kv/usage-and-pricing)

## Vercel Postgres

This was the part for which I was most excited. They introduced Postgres one of the most advanced general-purpose object-relational database management systems. I have been using it for my projects. It's powered by Neon a fully managed serverless PostgreSQL. Neon separates storage and computing to offer modern developer features such as serverless, branching, bottomless storage, and more.

Coincidentally I used Neon for a freelancing project and it was amazing as it provide a web interface to edit, give analytics and view tables which made the development of my Django app super easy. I will have to try it to be sure if it is as good as Neon. The creation of Postgres is simply the same as that of Vercel KV and only requires a name and region ( Singapore is available so I choose that ).

![creating vercel postgres](https://cdn.hashnode.com/res/hashnode/image/upload/v1684213441471/4143005e-18af-489d-87cb-2cef682a196d.png)

I copied the Template that they provide for the testing, you can get the template source at [GitHub](https://github.com/vercel/examples/tree/main/storage/postgres-starter). I modified its `page.tsx` file just to create, insert and select a value from the database.

```
import { sql } from "@vercel/postgres";

export default async function Home() {
  console.time("create");
  await sql`CREATE TABLE IF NOT EXISTS PERSON (name varchar(255), age int)`;
  console.timeEnd("insert");
  console.time("create");
  await sql`INSERT INTO PERSON (name, age) VALUES ('Akash', 21)`;
  console.timeEnd("insert");
  console.time("select");
  const { rows } = await sql`SELECT * FROM PERSON`;
  console.timeEnd("select");
  return (
    <div>
      {rows.map((row) => (
        <div key={row.age}>
          {row.name} - {row.age}
        </div>
      ))}
    </div>
  );
}


create: 474.285ms
insert: 102.999ms
select: 103.254ms

```

I have tested it for like 10 times and I think the time averages out nearest to these values. It's pretty good and fast for me at least. Vercel also has a web interface to view tables and execute queries same as Neon.

The pricing is almost the same as that of Vercel KV. And also include the same limitations as of the same. You can view the pricing [here](https://vercel.com/docs/storage/vercel-postgres/usage-and-pricing).

## Vercel Blob

This is something that can be very useful. Vercel Blob allows you to upload and serve files via a global network through unique and unguessable URLs. it's based on Cloudflare R2 which **allows you to store large amounts of** unstructured data like images and PDF files on the edge in other words it's a replacement for storage buckets like S3 and that could be a game changer if your **app does file uploads.** It is still in private beta but you can sign up for the waiting list to try it. To signup head to this [link](https://vercel.com/storage/blob).

They say it is users can upload files of **any size**. But for the private beta phase, the upload size is limited to `4 MB`, but soon they will release its full potential and will be available for public beta.

The SDK is pretty simple for developers to use same as the other storage. I don't have access to it so I can't test it for myself but I would say it would be good as the other two. As per the doc, the snippet given is

```
import { put } from '@vercel/blob';
import { NextResponse } from 'next/server';

export default async function upload(request) {
  const form = await request.formData();
  const file = form.get('file') as File;
  const blob = await put(file.name, file, { access: 'public' });

  return NextResponse.json(blob);
}

```

The pricing is available [here](https://vercel.com/docs/storage/vercel-blob/usage-and-pricing). It will be good for companies looking for storage that has some simplicity yet advanced technologies and have loads of money to waste.

## Is it worth it?

Without much of a surprise No, it's not worth it as they are priced insanely high. As it's vercel they have a bit high pricing as always but the products are also somehow astonishingly good and have a good user interface. To phrase it they are Apple of the web industry. But that doesn't justify the pricing,

- Vercel KV is 1.5x the price of Upstash scaling without the way more generous free tier.

- Vercel Postgres is 2x the price of Neon scaling without the way more generous free tier. The free tier of Neon has 3GB of storage compared to 256MB of Vercel, no limit of storage on its pro plans compared to 512MB of storage for Vercel, no limit on read and write data compared to Vercel, no limit on compute time compared to Vercel.

- Vercel Blob is 2 times the price of Cloudflare R2 without the way more generous free tier.

The prices may change later. The VP of Developer Experience at Vercel commented on Reddit that the prices may change with the feedback of the beta users and the pricing of vercel blob isn't final yet.

![reddit comment](https://cdn.hashnode.com/res/hashnode/image/upload/v1684227309553/a9b66bea-32e7-41cb-9447-37f4d7004aad.png)

This is still good for developers who don't want to use other applications just for the database instead they can find all the things in a single place which makes it easier to maintain and use.

## Conclusion

Vercel is an amazing platform for hosting web applications without a doubt. And I am sure I am going to use Vercel Postgres for future projects for sure. You should try it for sure as all the storage options are available for the Hobby plan. Vercel is trying new [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#server-actions) an **alpha** feature in Next.js, built on top of React [Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#actions). They enable server-side data mutations, reduced client-side JavaScript, and progressively enhanced forms. This would be a great feature for web developers.

Lastly thank you for reading this patiently and please follow me on Linkedin, you can find the link at [Akash R. Chandran | LinkedIn](https://www.linkedin.com/in/akashrchandran/).