Log in to leave a comment
No posts yet
Infrastructure management is one of the most draining tasks for modern B2B SaaS development teams. When you're stuck handling server configurations, security patches, and scaling issues instead of focusing on business logic, team productivity inevitably plateaus.
Recently, the HubSpot Developer Relations (DevRel) team formalized a Bring Your Own Backend (BYOB) strategy based on Vercel while redesigning their platform architecture. This is more than just using an external server; it's a declaration of intent to solve performance bottlenecks while giving developers complete freedom in their choice of tools. We’ll analyze why HubSpot moved away from its legacy, closed serverless environment to partner with Vercel, and look at the practical framework they use to build AI automation tools.
In the past, HubSpot's serverless functions faced many constraints. Implementing complex logic was difficult because only single JavaScript files were allowed, and using external libraries was cumbersome. However, following the 2025.2 platform update, the architecture has changed completely. HubSpot now fully decouples UI extensions from backend services.
The core of this structure is the hubspot.fetch API. This API acts as a security proxy, safely forwarding requests from UI cards to Vercel endpoints. This allows developers to enjoy Vercel's flexible development environment while remaining within HubSpot's secure ecosystem.
| Feature | HubSpot Native (Legacy) | Vercel-based BYOB (v2025.2+) |
|---|---|---|
| Infrastructure Control | HubSpot Managed (Limited) | Full Developer Control |
| Runtime Environment | Node.js (Single File) | Supports Node.js, Python, Go, etc. |
| Network Optimization | Fixed Region | Vercel Edge Network (Global) |
| Response Latency | Over 500ms (Cold Start) | Under 50ms (When using Edge) |
Looking at actual performance data, typical serverless functions suffer from hundreds of milliseconds of latency due to instance boot times. Conversely, leveraging Vercel's Edge Functions allows code to execute immediately at the network edge, reducing response times by up to 10x.
In a serverless architecture, your choice of database accounts for 80% of your performance. Within the HubSpot ecosystem, the criteria for choosing between the two most prominent solutions are clear.
If you need complex data relationships, Neon is the answer. Their Branching feature is a standout—it allows you to instantly clone your database state just like Git. This means you can spin up an independent test database environment in one second for every new feature or Pull Request.
If real-time data or API rate limiting is your priority, choose Upstash. Upstash supports HTTP-based connections, which completely removes the burden of maintaining TCP connections—a chronic issue for serverless functions—thereby saving resources.
Recommended Strategy: Use Neon for mirroring customer data or custom objects, and utilize Upstash for storing AI agent conversation contexts or scheduling Slack notifications.
Sprocky Change Dust, released by the HubSpot DevRel team, is a tool that uses AI to analyze platform changelogs and categorize their impact on technical stacks. To apply this in practice, follow this three-step process:
Use Vercel Cron Jobs to periodically parse the HubSpot changelog RSS feed. By using Upstash Redis to store processed post IDs, you can prevent resource waste caused by duplicate processing.
Simple summaries aren't enough. When designing LLM prompts, ensure they extract these three core tags:
Analysis results are sent to Slack or created as GitHub Issues via the GitHub API. The critical factor here is the timeout. Since AI analysis takes time, there is a high risk of exceeding Vercel's default timeouts (10s for Hobby, 60s for Pro).
To solve this, introduce tools like Upstash Workflow or Inngest. By breaking tasks into smaller steps, you enable Durable Execution, allowing the process to retry from the point of failure rather than starting over if a network error occurs.
To prevent code that worked locally from failing in production, always verify these four items:
app-hsmeta.json file. Omitting this will result in a 400 Proxy Error.engines field of package.json to eliminate environment mismatches.Combining HubSpot and Vercel offers value far beyond simple hosting. The environment is already set up for you to focus on core business value rather than getting trapped in infrastructure complexity. By applying the AI workflows introduced today to a small-scale project, you will see a definite shift in your team's development velocity.