Back to articles
Technology Insight

The "Serverless on VPS" Experiment: Deploying OpenFaaS and Knative Functions Without Cloud Provider Lock-in

May 19, 2026

Introduction: Redefining Serverless Boundaries

The serverless computing paradigm has revolutionized how developers build and deploy applications by abstracting away infrastructure management. Traditionally, this has meant committing to specific cloud providers like AWS Lambda, Azure Functions, or Google Cloud Run. However, a growing movement seeks to reclaim this flexibility by implementing serverless architectures on self-managed infrastructure, particularly Virtual Private Servers (VPS). This "serverless on VPS" approach combines the operational simplicity of serverless with the cost control and vendor independence of traditional hosting.

This experiment explores two leading open-source platforms that make this possible: OpenFaaS (Functions as a Service) and Knative. Both frameworks transform standard Kubernetes clusters—which can run on modest VPS instances—into powerful serverless platforms. We'll examine their architectures, deployment processes, performance characteristics, and ideal use cases to help you determine which solution best fits your development needs.

Understanding the Core Platforms

OpenFaaS: Developer-Focused Simplicity

OpenFaaS takes a straightforward approach to serverless functions. Built around the concept of "functions as containers," it provides a lightweight framework that can run on any Kubernetes cluster or even directly on Docker Swarm. The platform emphasizes three core principles: ease of use, community-driven development, and portability across environments.

Key architectural components include:

  • Gateway: An HTTP API that handles function invocation, scaling, and metrics collection
  • Queue Worker: Optional component for asynchronous processing using NATS Streaming
  • FaaS CLI: Command-line tool that streamlines function creation and deployment
  • Function Watchdog: Minimalist HTTP server that turns any container into a serverless function

What makes OpenFaaS particularly suitable for VPS deployments is its modest resource requirements. The control plane can run comfortably on a cluster with as little as 2GB of RAM, making it feasible for cost-conscious developers and small teams.

Knative: Enterprise-Grade Event-Driven Architecture

Knative, originally developed by Google with contributions from IBM, Red Hat, and SAP, represents a more comprehensive approach to serverless computing. Rather than being a standalone product, it's a set of Kubernetes extensions that add serverless capabilities to existing clusters. Knative consists of two primary components:

  • Serving: Manages serverless workloads with automatic scaling, revisions, and traffic routing
  • Eventing: Provides a robust system for event-driven architecture with multiple event sources and brokers

Knative's architecture is more complex than OpenFaaS but offers superior integration with Kubernetes-native tooling and enterprise features like gradual rollouts, blue-green deployments, and sophisticated event routing. This makes it particularly valuable for organizations already invested in Kubernetes who want to add serverless capabilities without introducing entirely new operational paradigms.

Experimental Setup: Deploying on VPS Infrastructure

Infrastructure Requirements

For this experiment, we provisioned three VPS instances from a mainstream provider with the following specifications:

  • Control Plane Node: 2 vCPUs, 4GB RAM, 50GB SSD (for Kubernetes control plane components)
  • Two Worker Nodes: 2 vCPUs each, 8GB RAM, 100GB SSD (for running functions)
  • Network Configuration: Private networking enabled between nodes, with a public load balancer
  • Operating System: Ubuntu 22.04 LTS with containerd runtime

We deployed a standard Kubernetes 1.28 cluster using kubeadm, ensuring proper network plugins (Calico) and storage provisioners were configured. The total monthly cost for this infrastructure was approximately $60-80, significantly less than comparable managed serverless offerings for sustained workloads.

OpenFaaS Deployment Process

Deploying OpenFaaS proved remarkably straightforward. Using the official Helm charts, we installed the platform in under 15 minutes:

  1. Added the OpenFaaS Helm repository and updated local charts
  2. Created separate namespaces for core components and functions
  3. Installed the OpenFaaS control plane with basic authentication enabled
  4. Deployed the OpenFaaS CLI and configured API gateway access
  5. Tested deployment with sample functions from the OpenFaaS store

The entire process required minimal Kubernetes expertise, thanks to OpenFaaS's excellent documentation and sensible defaults. We particularly appreciated the faas-cli tool, which allowed us to develop functions locally using Docker and deploy them with a single command.

Knative Deployment Challenges and Solutions

Knative installation proved more complex, primarily due to its dependency on specific Kubernetes versions and additional components like Istio or Kourier for networking. Our deployment process involved:

  1. Verifying Kubernetes cluster met prerequisites (CRI, metrics server, etc.)
  2. Installing the Knative Serving component using official operator
  3. Deploying Kourier as a lightweight alternative to Istio for ingress
  4. Configuring DNS and SSL certificates for proper domain routing
  5. Installing Knative Eventing with in-memory channel implementation

The entire Knative deployment took approximately 90 minutes, with most time spent troubleshooting DNS configuration and resource limits. However, once operational, the platform provided a noticeably more polished experience for traffic management and function lifecycle operations.

Performance Comparison and Analysis

Cold Start Performance

Cold starts—the delay when invoking a function that hasn't been recently used—represent a critical performance metric for serverless platforms. Our testing revealed significant differences between the two platforms:

  • OpenFaaS: Average cold start of 1.2-2.5 seconds for Node.js functions, depending on container size. The platform offers a "of-watchdog" HTTP mode that slightly improves startup times compared to the standard mode.
  • Knative: More variable cold starts ranging from 1.8-4 seconds, largely due to additional Kubernetes pod scheduling overhead. However, Knative's scale-to-zero grace period (default 30 seconds) means functions stay warm longer after invocation.

Both platforms support concurrency settings that can mitigate cold start impact for high-traffic functions, though this comes at the cost of increased resource consumption.

Resource Efficiency and Scaling Behavior

We monitored resource consumption during load testing with a gradually increasing request rate (10 to 1000 requests per minute):

  • OpenFaaS demonstrated predictable linear scaling, adding new function pods approximately every 5 seconds under sustained load. Memory overhead per function instance averaged 50-100MB beyond the function's own requirements.
  • Knative exhibited more aggressive scaling behavior, sometimes over-provisioning pods during rapid traffic spikes. However, its autoscaler (KPA) responded more quickly to sudden traffic increases, maintaining lower latency under burst conditions.

For most workloads, both platforms maintained sub-100ms latency for warm functions, with 99th percentile remaining under 300ms even during scaling events.

Cost Analysis: VPS vs. Cloud Serverless

The financial implications of running serverless functions on VPS infrastructure versus managed cloud services reveal compelling differences:

Fixed vs. Variable Cost Structures

Managed serverless platforms typically charge per invocation and execution time, with additional costs for memory allocation. For our test workload (100,000 invocations monthly, average 500ms execution, 256MB memory):

  • AWS Lambda: Approximately $1.50-$2.00 monthly
  • Google Cloud Functions: Approximately $1.20-$1.80 monthly
  • VPS-based OpenFaaS/Knative: Fixed $60-80 monthly regardless of invocation count

The break-even point occurs at approximately 3-4 million monthly invocations, after which VPS-based solutions become increasingly economical. This makes the "serverless on VPS" approach particularly valuable for:

  • High-volume internal APIs and microservices
  • Background processing with consistent workloads
  • Development and testing environments with unpredictable but frequent usage
  • Organizations with existing VPS infrastructure and expertise

Hidden Costs and Considerations

While the VPS approach offers predictable pricing, it introduces other costs:

  • Operational overhead: Monitoring, maintenance, and troubleshooting fall to your team
  • Resilience investment: Achieving high availability requires multiple VPS instances across regions
  • Security responsibility: Regular patching, vulnerability scanning, and access management

These factors make the VPS approach most suitable for organizations with existing DevOps capabilities or those handling sensitive data where cloud provider restrictions pose compliance challenges.

Practical Use Cases and Implementation Patterns

OpenFaaS: Ideal for Development Teams and Specialized Functions

OpenFaaS excels in scenarios where development velocity and simplicity matter most:

  • Internal tooling and automation: Quick deployment of one-off scripts and utilities
  • API endpoint prototyping: Rapid iteration on microservices without complex deployment pipelines
  • Event-driven data processing: Combining with Kafka or Redis streams for real-time analytics
  • Machine learning inference endpoints: Deploying TensorFlow or PyTorch models as scalable functions

The OpenFaaS template system allows teams to standardize function development across languages while maintaining flexibility for specialized requirements.

Knative: Enterprise Workloads and Complex Event Systems

Knative's strengths emerge in more sophisticated deployment scenarios:

  • Gradual feature rollouts: Canary deployments and traffic splitting for risk-free releases
  • Complex event processing: Multi-stage workflows with event sourcing and saga patterns
  • Legacy application modernization: Incremental refactoring of monolithic applications
  • Multi-cloud deployments: Consistent serverless abstraction across different Kubernetes environments

Knative Eventing's broker/trigger model provides particularly powerful capabilities for building decoupled, resilient systems that can withstand component failures.

Security Considerations and Best Practices

Running serverless platforms on self-managed infrastructure introduces unique security responsibilities:

Platform Security Hardening

Both OpenFaaS and Knative require careful configuration to meet enterprise security standards:

  • Network policies: Restrict function-to-function communication using Kubernetes NetworkPolicies
  • Function isolation: Run functions with non-root users and read-only filesystems where possible
  • Secret management: Integrate with Kubernetes Secrets or external vaults rather than embedding credentials
  • API gateway protection: Implement rate limiting, authentication, and DDoS protection

OpenFaaS offers commercial offerings with additional security features, while Knative benefits from the broader Kubernetes security ecosystem.

Compliance and Audit Requirements

For regulated industries, the VPS approach provides advantages in several areas:

  • Data sovereignty: Complete control over data location and jurisdiction
  • Audit trails: Direct access to all platform logs without provider abstraction
  • Custom compliance frameworks: Ability to implement organization-specific security controls

These benefits must be balanced against the increased responsibility for maintaining compliance documentation and evidence.

Future Evolution and Industry Trends

The "serverless on VPS" concept aligns with several broader industry trends:

Edge Computing Integration

Both OpenFaaS and Knative are evolving to support edge computing scenarios where functions run closer to end users. Lightweight Kubernetes distributions like K3s make it feasible to deploy serverless platforms on edge devices with limited resources, opening possibilities for:

  • Real-time IoT data processing at network edge
  • Content customization based on local context
  • Reduced latency for interactive applications

Wasm (WebAssembly) Integration

Emerging support for WebAssembly as a function runtime promises significant improvements in cold start performance and security isolation. Both platforms have experimental Wasm support that could eventually make VPS-based serverless even more competitive with cloud offerings.

Hybrid Deployment Models

Forward-thinking organizations are adopting hybrid approaches that combine VPS-based serverless for predictable workloads with cloud serverless for burst capacity. Tools like the OpenFaaS Cloud Connector already enable this pattern, allowing functions to be deployed across multiple environments from a single control plane.

Conclusion: Choosing Your Path Forward

The "serverless on VPS" experiment demonstrates that viable alternatives exist to vendor-locked cloud serverless platforms. Both OpenFaaS and Knative provide robust foundations for building serverless applications on your own terms, each with distinct strengths:

Choose OpenFaaS if you value simplicity, rapid deployment, and a gentle learning curve. Its straightforward architecture and excellent documentation make it accessible to teams without deep Kubernetes expertise while still providing enterprise-grade capabilities through commercial offerings.

Choose Knative if you need advanced traffic management, sophisticated event systems, and tight integration with existing Kubernetes tooling. The additional complexity delivers corresponding benefits in deployment flexibility and operational control.

Ultimately, the decision between cloud-managed and self-managed serverless involves tradeoffs between operational convenience and control, variable versus fixed costs, and vendor dependence versus independence. For organizations with specific compliance requirements, predictable high-volume workloads, or existing VPS investments, running OpenFaaS or Knative on virtual private servers represents not just a viable alternative, but potentially a superior architectural choice.

As the serverless ecosystem continues to mature, we anticipate increasing convergence between cloud and self-hosted offerings, with improved tooling for multi-environment management and more seamless migration paths. The future of serverless computing may well be pluralistic—with different deployment models coexisting and interoperating based on workload characteristics rather than vendor preferences.