Skip to main content

How Rishi Raj Jain helped improve the Home page speed of Neon

· 7 min read
Paridhi Khandelwal
Marketer @ SpeedVitals

SpeedVitals Pro

Today, we are starting a new series on our blog where we will be interviewing Web Performance Enthusiasts and discussing various performance optimization strategies with them.

For the first edition, we have Rishi Raj Jain with us, a Software Engineer who worked as Founding Solutions Engineer at Neon.

He is of those rare builders who's not just good at what he does, but genuinely enjoys the process. Over the years, Rishi has worked on all kinds of tech challenges, building tools that make developers' lives easier.

He's been part of teams like Neon and Lemon Squeezy, where he focused on solving practical problems. One of his favorite creations is LaunchFast, a starter kit built to help devs hit the ground running, with login, payments, blog, documentation, and more already wired in.

In this interview with Kashish Kumawat, CEO of SpeedVitals, Rishi talks about how he helped optimize the home page of Neon's website with the SpeedVitals TTFB Test.

This article provides useful insights for developers, product builders, and anyone interested in learning more about web performance optimization.

Interview Questions

Q. Tell me a little about your Technical Background and Expertise

I have a broad technical background as an engineer (you could call me a “generalist”?), with particular expertise in content delivery networks and Postgres databases. At Edgio, a CDN and EdgeJS provider (a Vercel competitor back in the day), I worked as a Technical Customer Success Manager, focusing on performance optimization and e-commerce integrations. I also worked as a Support Engineer at Lemon Squeezy, handling customer issues and streamlining support processes. More recently, I worked with Neon as their Founding Solutions Engineer, where I helped shape the Solutions Engineering function and gained hands-on experience with Postgres.

At Neon, I acted as the go-to technical partner for customers, guiding them on best practices and leading complex database migrations with minimal downtime. I built and maintained Neon's developer examples repository, contributed technical guides and documentation, and created product demos showcasing features like branching and point-in-time recovery. Beyond infrastructure, I enjoy building developer tools and front-end apps, such as LaunchFast, a provider-agnostic starter kit. I'm also enthusiastic about the Astro framework and passionate about delivering robust, full-stack solutions.

Q. What are some projects that you have built, and which one did you enjoy the most working on?

Some of the projects I've built include LaunchFast, a production-ready SaaS starter kit available in Astro, Next.js, and SvelteKit. LaunchFast is designed to help developers quickly bootstrap applications with features like secure authentication (email/password, magic links, OAuth 2.0), seamless integration with multiple database providers (such as Firebase Firestore, Postgres, MySQL, SQLite, MongoDB), file uploads (AWS S3, CF R2, Supabase Storage, Firebase Storage), payment processing (via Stripe), dynamic blog and documentation pages, transactional emails (Resend, Postmark, Sendgrid, Mailgun), analytics, and out-of-the-box deployment support with various providers (Vercel, Netlify, Fly, Cloudflare Workers). It's been especially well-received on the tech X and the Astro community for its flexibility and comprehensive integrations.

I've also built interactive demos (in public visibility) for Neon, such as the branching demo to showcase Neon's powerful branching capabilities, and the PITR (Point-In-Time Recovery) demo to illustrate fast recovery from outages. Another project I enjoyed is astro-font, a utility that simplifies web font optimization in Astro projects, making it easy to self-host, preload, and control font loading strategies for better performance and user experience. LaunchFast has been the most rewarding to work on, as it directly helps other developers save time and build robust products with modern frameworks and allows me to keep up with the ecosystem.

Q. What's your favourite tech stack and what do you like about it?

Working with different tech stacks has allowed me to appreciate the trade-offs between each service and to know that there's no particular tech stack that I'm (completely) biased towards. I've accepted engineering to be just trade-offs and only time will tell the odds of success of each tech stack in a given use case. That said, I love Astro and Next.js for the simplicity and the wide ecosystem they bring with themselves. Cloudflare Workers and Vercel for deploying my applications and Cloudflare R2 for object storage have simplified my workflow.

I have been a long time user of SpeedVitals, for whether it is to evaluate performance of a website or to measure TTFB of one. With SpeedVitals, I'm sure that I'm covering most of the regions on the planet, and hence I'm able to test and ship things confidently to match the real experience of the users. Using SpeedVitals helped me demonstrate the right comparison of the website performance (before and) after CDN specific improvements.

Q. How's your journey been with Neon?

Working at Neon has been an incredibly rewarding experience, both personally and professionally. As the founding solutions engineer, I had the unique opportunity to contribute across multiple areas - product development, customer success, and documentation, which gave me a comprehensive view of how solutions engineering teams and processes are built from the ground up. This role helped me overcome my initial hesitation around making mistakes and taught me the value of clear, context-driven communication.
Additionally, I learned how to thrive in an asynchronous, remote environment while still feeling deeply connected to the team and aligned with the company's goals. Focusing on single tasks and seeing them to completion, rather than multitasking has significantly improved my productivity and impact, enabling me to deliver better results in all aspects of my work (and even in personal life).

Q. How did you realise that the homepage of Neon needed performance optimisation?

So, neon.tech homepage has a logic where logged-in users are redirected to console.neon.tech and served the homepage at /home, while unauthenticated users can see the homepage directly on neon.tech. Although this flow seemed straightforward and relied on cookie-based validation, the team observed unexpectedly high Time to First Byte (TTFB) values for the homepage. This prompted a deeper investigation, as TTFB is a foundational web performance metric.

Q. What steps did you follow to figure out the performance issues that needed to be fixed?

Once I became aware of the TTFB issue, I drew on my CDN experience to outline the components necessary for an optimal TTFB setup:

  • Static page served by the CDN: Ideally, the homepage should be cached at the edge and invalidated on each deployment.
  • Dynamic logic injected at the edge: Any required logic should execute in a lightweight edge environment, such as Vercel Edge, to minimize operation overhead.

Before implementing changes, I needed to assess the homepage's global performance. I used SpeedVitals TTFB Test to generate a report, which confirmed our hypothesis, TTFB was consistently around 200ms worldwide.

SpeedVitals Pro

Next, I reviewed the codebase (https://github.com/neondatabase/website) to determine:

  • Whether the root (/) or /home routes were being served as static pages with no revalidation.
  • If the logic was running in a lightweight environment, such as Vercel Edge, to ensure minimal processing overhead and optimal delivery.

Q. Lastly, how did you implement the performance fixes, and what was the outcome?

In the referenced pull requests (#2624 and #2597), the team implemented several key optimizations to improve homepage performance:

  • Removed page revalidation: Ensured that the homepage is served as a static asset, eliminating unnecessary server-side revalidation.
- export const revalidate = 60;
+ export const revalidate = false;
  • Added Shared Cache Headers on Vercel: Enabled more effective CDN caching, allowing the homepage to be quickly served from the edge.
{
"source": "/",
"headers": [
{
"key": "Cache-Control",
"value": "max-age=0, s-maxage=31536000"
}
]
},
{
"source": "/home",
"headers": [
{
"key": "Cache-Control",
"value": "max-age=0, s-maxage=31536000"
}
]
}
  • Moved Real-Time Logic to Next.js Middleware: Shifted dynamic logic to lightweight edge middleware, reducing environment overhead and improving Time to First Byte (TTFB).

After these changes were merged, I used the SpeedVitals TTFB test to validate the improvements. I am pleased to report that the homepage now consistently achieves excellent TTFB results globally.

Here are the TTFB results after optimization:

SpeedVitals Pro