08/04/23

Vercel: Key use cases and limitations

A look at Vercel and its key use cases and important limitations

3 Min Read

Vercel is becoming a prominent name in the frontend hosting space, but what is it exactly? How does it work? And how can it be complemented with other solutions like Encore for building more advanced business logic? This article aims to provide clear answers to these questions and more.

What is Vercel?

Vercel is a cloud platform optimized for frontend deployment and hosting. It emphasizes speed, ease of use, and seamless collaboration, making it a popular choice for developers and organizations.

What is Vercel Used For?

Vercel is primarily used for hosting static sites, Single Page Applications (SPAs), and JAMstack architectures. It supports continuous deployment from Git, automatic HTTPS, and a global content delivery network (CDN). Many developers choose Vercel to host their frontends because of its developer-friendly features and robust performance.

How Does Vercel Work?

Continuous Deployment

Vercel integrates with popular Git providers like GitHub, GitLab, and Bitbucket. It watches for changes and deploys your frontend every time you push a new commit.

Serverless Functions

Vercel supports serverless functions, allowing you to run backend code in response to HTTP requests. This enables some backend capabilities without managing an entire backend server.

Global CDN

Vercel uses a global CDN to serve your site from the nearest physical location to the user. This ensures that your site loads quickly no matter where your users are located.

How to Deploy on Vercel?

Deploying on Vercel is quite simple:

  1. Push Your Code: Push your frontend code to a Git repository.
  2. Connect to Vercel: Sign in to Vercel and connect your Git repository.
  3. Configure if Needed: Configure build settings if necessary. Vercel will automatically detect many popular frameworks.
  4. Deploy: Vercel will deploy your site, and you can view it live!

Limitations of Vercel in the Backend Space

Vercel's primary focus is on the frontend, and while it offers serverless functions for simple backend tasks, it may not be suitable for more complex or advanced backend needs. Limitations include:

  • Limited Language Support: Vercel's serverless functions support a limited set of languages.
  • Complexity: Building more advanced business logic can quickly become cumbersome or inefficient as you lack access to key backend primitives such as Pub/Sub, critical for building event-driven applications.
  • Scalability and Performance Concerns: Complex applications with heavy backend processing may face scalability challenges on Vercel due to its limited flexibility in picking infrastructure services.

Encore: A Complement to Vercel for building backend applications

Encore is an open-source development platform for building scalable backend applications. It's particularly powerful when used in conjunction with Vercel to build more advanced business logic, or a performant backend system to support a frontend application hosted on Vercel. The key benefits of using Encore together with Vercel are:

  1. Seamless Integration: Encore can integrate with Vercel-hosted frontends using automatically generated API clients.
  2. Full-fledged Backend Capabilities: Encore supports complex backend development, handling things like service discovery, authentication, Pub/Sub queues, caching, cron jobs, and multi-cloud deployments.
  3. Low complexity: Encore provides a Backend SDK that lets developers define infrastructure needs directly in application code. Encore the automates the provisioning and configuration of infrastructure in multiple environments, locally and in the cloud in AWS and GCP.

Conclusion

Vercel offers a fantastic platform for hosting frontends but users may face limitations when it comes to more complex backend tasks. Encore provides a suitable complement, empowering developers to build more robust backends that can integrate seamlessly with Vercel through automatically generated API clients.

Together, Vercel and Encore create a comprehensive solution that covers the full spectrum of modern web and application development needs. Whether you're a hobbyist or part of a fast-growing startup, we recommend evaluating if using these platforms together would enhance your development experience and the final product.

Ready to escape the hamster wheel?

Encore is Backend Development Platform purpose-built for creating event-driven and distributed systems — from developing locally to scaling in your cloud on AWS/GCP.