About Us

At Actinode, we're a team of tech enthusiasts dedicated to transforming ideas into innovative solutions. With a strong foundation in technology and creativity, we bring together expertise from various domains to deliver exceptional results. Our mission is to turn your visions into reality through cutting-edge technology and a collaborative approach. Meet the passionate professionals behind Actinode – committed to driving innovation and creating impactful solutions for your business.

Cloud Migration & Cost Optimization

80% Infrastructure Cost Reduction Through Vercel to Kubernetes Migration

Migrated a Swedish marketplace platform from Vercel to Kubernetes, eliminating vendor lock-in and reducing monthly infrastructure costs from 10,000 SEK to 2,000 SEK—an 80% cost reduction.

October 2024
Swedish Marketplace Platform
8 weeks
4 Senior Engineers (DevOps, Frontend, Backend)

Overview

Migrated a Swedish marketplace platform from Vercel to Kubernetes, eliminating vendor lock-in and reducing monthly infrastructure costs from 10,000 SEK to 2,000 SEK—an 80% cost reduction.

Industry

E-Commerce & Marketplace

Offering

Cloud Migration & Infrastructure Cost Optimization

Business Challenges

A rapidly growing Swedish marketplace company was facing unsustainable infrastructure costs that threatened profitability:

  • Excessive Cloud Costs: Paying 10,000 SEK (~$950 USD) monthly for Vercel alone, with costs increasing by 30% month-over-month
  • Unoptimized Bundles: Frontend applications had massive JavaScript bundles (3-5MB) causing slow load times and high bandwidth costs
  • Expensive Serverless Functions: Node.js APIs deployed as Vercel serverless functions with high invocation costs
  • Cache Storage Explosion: Poor caching strategies generated terabytes of unnecessary cache data at premium Vercel storage rates
  • Vendor Lock-in: Heavy dependency on Vercel-specific libraries made migration seem impossible to internal team
  • Scalability Concerns: As traffic grew, costs were scaling linearly without business justification
  • Limited Control: Lack of infrastructure control made optimization and custom configurations difficult

Business Requirements

The client needed immediate cost reduction without compromising performance or availability:

  • Reduce Infrastructure Costs: Cut Vercel costs by at least 60-70% within 2 months
  • Maintain Performance: Ensure migration doesn't negatively impact page load times or API response times
  • Remove Vendor Lock-in: Eliminate dependency on Vercel-specific libraries for future flexibility
  • Zero Downtime: Execute migration without service interruption to customers
  • Optimize Applications: Fix bundle sizes and caching issues as part of migration
  • Leverage Existing Infrastructure: Utilize their existing Kubernetes cluster already running some services
  • Enable Team Independence: Provide documentation and training so internal team can manage infrastructure

Key Results

80%Cost Reduction
10K → 2K SEKMonthly Savings
70%Bundle Size Reduction
ZeroDowntime

The Challenge

The client approached us in a difficult position. Their CFO had flagged infrastructure costs as unsustainable, but their technical team had attempted migration for 6 weeks without success:

The Problem:

  • Multiple frontend applications (React/Next.js) and Node.js backends all tightly coupled with Vercel
  • Vercel-specific libraries deeply integrated throughout the codebase:

- `@vercel/build-utils` for build processes

- `@vercel/node` for serverless function handling

- Vercel Edge Functions for some API routes

- Vercel-specific environment variable handling

- Custom Vercel routing configurations

  • Internal team lacked expertise in Kubernetes deployment for frontend applications
  • No proper build optimization - bundles included unused dependencies, duplicate code, and unminified assets
  • Caching configuration generated excessive edge cache data (100GB+ monthly)
  • Serverless functions were triggering millions of cold starts monthly

Business Impact:

  • 10,000 SEK/month was 15% of their entire operational budget
  • Costs projected to reach 20,000 SEK/month within 6 months at current growth rate
  • Pressure from investors to achieve profitability requiring aggressive cost cutting
  • Engineering team morale affected by failed migration attempts
  • Fear of downtime preventing aggressive action

Technical Complexity:

  • 5 separate frontend applications with shared dependencies
  • 8 Node.js API services with varying traffic patterns
  • Complex CI/CD pipelines built around Vercel's deployment model
  • No containerization experience for frontend applications
  • Kubernetes cluster existed but only used for backend databases

Our Solution

We executed a systematic migration and optimization strategy over 8 weeks:

Phase 1: Analysis & Audit (Week 1)

  • Conducted comprehensive cost analysis of Vercel usage across all services
  • Identified main cost drivers:

- Bandwidth: 40% of cost (due to large bundles)

- Serverless invocations: 35% of cost

- Edge cache storage: 20% of cost

- Build minutes: 5% of cost

  • Analyzed bundle sizes and identified optimization opportunities
  • Mapped Vercel library usage across all applications
  • Assessed existing Kubernetes cluster capacity and requirements

Phase 2: Bundle Optimization (Weeks 2-3)

  • Implemented webpack bundle analysis for all frontend apps
  • Removed unused dependencies reducing bundle sizes by 60-70%
  • Implemented code splitting and lazy loading for routes
  • Configured tree shaking to eliminate dead code
  • Set up proper minification and compression (Brotli/Gzip)
  • Optimized image assets with Next.js Image Optimization alternatives
  • Results: Bundle sizes reduced from 3-5MB to 800KB-1.2MB

Phase 3: Vercel Library Decoupling (Weeks 3-4)

  • Replaced Vercel-specific build tools with standard Webpack/Babel configurations
  • Created custom Babel presets replicating Vercel's React optimization
  • Converted Vercel serverless functions to standard Express.js applications
  • Replaced `@vercel/node` with native Node.js HTTP handling
  • Implemented custom routing to replace Vercel Edge Network routing
  • Standardized environment variable handling with dotenv
  • Created deployment scripts independent of Vercel CLI

Phase 4: Containerization (Week 5)

  • Created optimized Docker images for all frontend applications

- Multi-stage builds for minimal image sizes (from 1.2GB to 180MB)

- NGINX as static file server for production builds

- Proper layer caching for faster builds

  • Containerized Node.js services with PM2 for process management
  • Established Docker registry on existing infrastructure
  • Implemented health check endpoints for container orchestration

Phase 5: Kubernetes Deployment (Weeks 6-7)

  • Created Kubernetes manifests (Deployments, Services, Ingress) for all applications
  • Configured NGINX Ingress Controller with proper SSL/TLS termination
  • Implemented Horizontal Pod Autoscaler (HPA) based on CPU/memory metrics
  • Set up proper resource limits and requests for cost control
  • Configured persistent volumes for shared assets
  • Implemented blue-green deployment strategy for zero-downtime migrations
  • Deployed to staging environment and conducted thorough testing

Phase 6: Migration & Monitoring (Week 8)

  • Executed gradual traffic migration using DNS-based routing (10% → 50% → 100%)
  • Monitored performance metrics, error rates, and user experience continuously
  • Fine-tuned Kubernetes configurations based on real traffic patterns
  • Decommissioned Vercel services after successful validation
  • Set up cost monitoring and alerting for new infrastructure
  • Documented entire infrastructure and trained internal team

Key Features

  • 80% reduction in monthly infrastructure costs (10,000 SEK → 2,000 SEK)
  • 60-70% smaller JavaScript bundles improving load times by 3x
  • Zero vendor lock-in with standard Docker/Kubernetes deployment
  • Horizontal auto-scaling handling 10x traffic spikes automatically
  • Multi-stage Docker builds reducing image sizes by 85%
  • Blue-green deployment strategy ensuring zero-downtime updates
  • Custom Babel/Webpack configuration replacing Vercel build tools
  • Comprehensive monitoring and alerting with Prometheus/Grafana

Results & Impact

  • Massive Cost Savings: Reduced monthly infrastructure costs from 10,000 SEK to 2,000 SEK—saving 96,000 SEK (~$9,000 USD) annually
  • Performance Improvement: Page load times improved by 3x due to optimized bundles (3-5MB → 800KB-1.2MB)
  • Zero Downtime Migration: Completed full migration without any service interruption using blue-green deployment
  • Vendor Independence: Eliminated all Vercel dependencies, enabling future flexibility in cloud provider choice
  • Scalability Achievement: Auto-scaling Kubernetes setup handles 10x traffic spikes without manual intervention
  • Team Empowerment: Internal DevOps team trained and capable of managing infrastructure independently
  • Build Optimization: CI/CD pipeline execution time reduced from 12 minutes to 4 minutes
  • Resource Efficiency: Right-sized Kubernetes pods consuming 60% less memory than Vercel serverless cold starts

Actinode Solution Approach

Our approach combined DevOps expertise with practical cost optimization strategies:

Vendor Lock-in Elimination:

  • Systematically identified and replaced every Vercel-specific dependency
  • Created migration playbook reusable for future platform changes
  • Implemented industry-standard tools ensuring portability

Smart Optimization:

  • Bundle analysis revealed 60% of code was unused libraries
  • Implemented aggressive code splitting reducing initial load by 70%
  • Custom Babel configuration matched Vercel's optimization without vendor lock-in

Kubernetes Expertise:

  • Designed production-grade Kubernetes architecture
  • Implemented auto-scaling preventing over-provisioning
  • Zero-downtime migration strategy with gradual traffic shifting

Cost Consciousness:

  • Every decision evaluated for cost impact
  • Right-sized resources based on actual usage patterns
  • Eliminated unnecessary caching overhead

Knowledge Transfer:

  • Comprehensive documentation of entire infrastructure
  • Hands-on training sessions for internal DevOps team
  • Created runbooks for common operations and troubleshooting

Business Benefits

  • Profitability Impact: 8,000 SEK monthly savings contributed directly to achieving profitability milestone ahead of schedule
  • Investor Confidence: Demonstrated fiscal responsibility and technical competence, supporting Series A fundraising
  • Predictable Costs: Moved from variable Vercel costs to fixed Kubernetes infrastructure with predictable scaling
  • Competitive Advantage: Lower infrastructure costs enable more competitive pricing in marketplace
  • Technical Debt Reduction: Bundle optimization and standardization improved overall code quality
  • Faster Feature Delivery: Reduced build times mean faster deployment cycles and quicker time-to-market
  • Future-Proof Architecture: Standard Kubernetes deployment allows easy migration to any cloud provider
  • Customer Experience: Faster page loads (3x improvement) increased conversion rates by 12%

Technologies Used

ReactNext.jsNode.jsExpress.jsDockerKubernetesNGINXWebpackBabelPrometheusGrafana

Conclusion

This migration project transformed an unsustainable cost structure into a lean, efficient infrastructure while simultaneously improving performance and eliminating vendor lock-in. The 80% cost reduction directly contributed to the company's path to profitability and demonstrated that smart architecture decisions can deliver immediate business value.

Future Enhancements

Planned enhancements include implementing CDN for static assets, exploring spot instances for additional cost savings, and setting up multi-region Kubernetes clusters for global expansion.

Have a Similar Project in Mind?

Let's discuss how we can help you achieve similar results for your business.