Serverless on Vercel and Netlify Link to heading

The serverless movement has been gaining momentum for several years, but it wasn’t until I started migrating client projects off WordPress that I discovered the real power of Vercel and Netlify. What started as experiments with Vercel quickly led me to settle on Netlify for most client work, fundamentally changing how I approach web development for small businesses.

What Drew Me to Serverless Link to heading

My initial interest in serverless platforms was driven by real client pain points: WordPress sites that had become error-prone, required constant maintenance, and couldn’t handle traffic spikes. Running WordPress on AWS EC2 micro instances was affordable but couldn’t scale when demand peaked; which was exactly when clients needed their sites to work most.

The always-on database requirement and server maintenance overhead was becoming unsustainable for simple brochure sites. A single traffic spike from a social media mention could bring down the entire site, and scaling up required manual intervention and increased costs. Serverless platforms promised to eliminate these headaches while dramatically reducing costs and automatically handling traffic spikes.

First Impressions of Vercel Link to heading

Vercel’s approach immediately impressed me with its simplicity. Connecting a GitHub repository and getting automatic deployments for every push felt almost magical coming from traditional deployment workflows.

The Deployment Experience Link to heading

// pages/api/hello.js
export default function handler(req, res) {
  res.status(200).json({
    message: "Hello from serverless function!",
    timestamp: new Date().toISOString(),
  })
}

This simple API route becomes a serverless function automatically when deployed to Vercel. No configuration files, no build scripts; just JavaScript code that runs in response to HTTP requests.

Performance Characteristics Link to heading

The edge network deployment meant that static assets were served from locations close to users globally. Combined with their intelligent caching, the performance improvements were immediately noticeable compared to traditional single-region deployments.

Cold start times for functions were consistently under 100ms, which was acceptable for most API use cases I tested.

Exploring Netlify’s Approach Link to heading

Netlify takes a slightly different approach, positioning itself as a platform for the entire JAMstack rather than just serverless functions. Their feature set is broader, including form handling, identity management, and split testing.

Netlify Functions Link to heading

// netlify/functions/api.js
exports.handler = async (event, context) => {
  const { httpMethod, path, queryStringParameters } = event

  if (httpMethod === "GET") {
    return {
      statusCode: 200,
      body: JSON.stringify({
        message: "Hello from Netlify Function",
        path,
        query: queryStringParameters,
      }),
    }
  }

  return {
    statusCode: 405,
    body: JSON.stringify({ error: "Method not allowed" }),
  }
}

Netlify’s function format requires more boilerplate but provides greater control over the HTTP response. The AWS Lambda-style event/context pattern feels more explicit about what’s happening under the hood.

Real Client Projects Link to heading

Project 1: Restaurant Website Migration Link to heading

My first major serverless migration was a local restaurant’s WordPress site that kept crashing from random database errors and required constant plugin updates.

Previous WordPress setup:

  • EC2 micro instance ($10/month + traffic costs)
  • MySQL database requiring maintenance
  • Plugin conflicts and security issues
  • Site crashes were commonplace - Unable to connect to database

New Netlify setup:

  • Hugo static site with menu management
  • OpenTable for reservations
  • Automatic deployment from Git
  • Zero downtime, unlimited scaling

The transformation was remarkable. The site became lightning-fast, completely maintenance-free, and cost dropped to essentially zero. Most importantly, it never went down the whole time I managed it.

Project 2: Professional Services Firm Link to heading

A builder’s WordPress site was costing them $30+/month in hosting plus constant security updates and backup management.

The WordPress problems:

  • Security plugin conflicts
  • Regular malware scanning requirements
  • Manual backups and updates
  • Slow loading times affecting SEO

Netlify solution:

  • Static site with project area pages
  • Contact forms routing to their existing email
  • CMS integration for completed projects
  • Automatic SSL and global CDN

Result: $0/month hosting costs, 10x faster loading, and zero maintenance overhead.

Project 3: Political Campaign Site Link to heading

The most interesting project was a political party’s election campaign site that only needed to run for 8-10 weeks. This perfectly illustrated why serverless wins over traditional hosting:

Traditional hosting challenges:

  • Unpredictable traffic spikes during debates/announcements that could crash WordPress
  • EC2 micro instances couldn’t handle sudden traffic bursts without manual scaling
  • Short-term nature made server setup and maintenance wasteful
  • Security critical for political content, but WordPress plugins created vulnerabilities
  • Database performance bottlenecks during high-traffic events

Serverless advantages:

  • Automatic scaling for viral content without any configuration
  • Pay-per-use pricing ideal for temporary campaigns (vs. paying for always-on servers)
  • Built-in DDoS protection and security without security plugins
  • Easy to add team members for content updates through Git workflows
  • Zero maintenance overhead during the critical campaign period

The campaign experienced several traffic spikes of 50x normal traffic during debates and major announcements. A WordPress site on EC2 micro would have crashed repeatedly, but the Netlify deployment handled everything seamlessly. When the campaign ended, we simply archived the site; no servers to shut down, no ongoing costs.

Comparing the Platforms Link to heading

Why I Started with Vercel but Settled on Netlify Link to heading

Vercel’s appeal:

  • Incredibly smooth Next.js integration
  • Impressive performance out of the box
  • Zero-config deployment that “just worked”

Why I switched to Netlify for client work:

  • Forms: Built-in form handling was crucial for business sites
  • CMS Integration: Better support for client-friendly content management
  • Pricing: More predictable costs for client projects
  • Features: Identity management, redirects, and split testing included
  • Flexibility: Worked with any static site generator, not just Next.js

For client work, Netlify’s comprehensive feature set meant fewer third-party integrations and lower complexity.

Limitations and Challenges Link to heading

Cold Starts Link to heading

Both platforms experience cold start latency when functions haven’t been called recently. For most web applications this isn’t noticeable, but it can impact performance for time-sensitive operations.

Execution Time Limits Link to heading

Vercel’s free tier limits function execution to 10 seconds, while Netlify allows 10 seconds on free and 15 minutes on paid plans. This constrains the types of operations you can perform.

Debugging Complexity Link to heading

Local development of serverless functions can be challenging. Both platforms provide CLI tools for local testing, but the experience isn’t as smooth as traditional server development.

Vendor Lock-in Concerns Link to heading

While both platforms support standard APIs, migrating between them or to traditional infrastructure requires some refactoring. The convenience comes with reduced portability.

Cost Analysis Link to heading

For small to medium projects, both platforms are incredibly cost-effective. The free tiers are generous enough for most personal projects and small businesses.

The WordPress Cost Comparison:

  • WordPress hosting: $10-50/month + maintenance time
  • Security plugins and backups: $5-15/month
  • Developer maintenance: $100-300/month
  • Total: $115-365/month plus downtime risks

Netlify costs for the same sites:

  • Most brochure sites: $0/month (free tier sufficient)
  • High-traffic sites: $19/month maximum
  • Maintenance: $0 (automatic updates and security)
  • Total: $0-19/month with better performance and reliability

The cost savings alone made the migration worthwhile, but the performance and reliability improvements were the real win.

Development Workflow Changes Link to heading

Git-Centric Deployment Link to heading

Both platforms embrace Git as the source of truth for deployments. Every push triggers a new deployment, with automatic rollback capabilities if builds fail.

Preview Deployments Link to heading

Branch-based preview deployments have changed how I handle feature development and collaboration. Every pull request gets its own URL for testing, making review processes much smoother.

Environment Management Link to heading

Environment variables are managed through web interfaces, which is convenient but different from traditional file-based configuration management.

Security Considerations Link to heading

Serverless platforms handle many security concerns automatically; OS patching, network security, and infrastructure hardening are managed by the platform.

However, this shifts responsibility to application-level security. Function code, API keys, and data handling become more critical since you have less control over the underlying environment.

Performance Optimisations Link to heading

Static Asset Optimisation Link to heading

Both platforms provide automatic image optimisation and compression, significantly improving page load times without manual configuration.

Caching Strategies Link to heading

Understanding how each platform handles caching became crucial for optimising performance. Vercel’s edge caching is more transparent, while Netlify’s CDN behaviour requires more configuration.

Future Potential Link to heading

The serverless model is clearly the future for many types of applications. The ability to scale automatically, pay only for usage, and eliminate server management overhead is compelling.

Edge computing capabilities are expanding rapidly, bringing computation closer to users and reducing latency for global applications.

Key Takeaways Link to heading

After migrating multiple WordPress sites to serverless platforms, they have fundamentally changed how I approach client projects:

  1. Perfect for business websites: Static sites with forms and dynamic functionality replace most WordPress use cases
  2. Elimination of maintenance: No more plugin updates, security patches, or database management
  3. Cost-effective scaling: Pay-per-use pricing means costs drop to near-zero for typical business sites
  4. Reliability improvement: Sites that used to crash during traffic spikes now handle them effortlessly
  5. Client confidence: Business owners can focus on their business instead of website maintenance

When to Use Serverless Link to heading

  • WordPress brochure sites (restaurants, professional services, small businesses)
  • Campaign and temporary websites with unpredictable traffic
  • Business websites requiring high uptime during critical periods
  • Sites where maintenance overhead needs to be eliminated
  • Projects where automatic scaling is essential

When to Consider Alternatives Link to heading

  • Complex applications requiring server-side sessions
  • Sites needing extensive user-generated content with complex workflows
  • Applications requiring persistent database connections
  • High-frequency, real-time data processing

The serverless model isn’t universally applicable, but for most business websites; especially those currently running on WordPress; it provides an excellent balance of simplicity, reliability, and cost-effectiveness that eliminates the common pain points of traditional hosting.


What’s been your experience with serverless platforms? Have you found use cases where they particularly excel or struggle?