Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Questions - Developer Experience with this plugin #59

Closed
@Vadorequest

Description

@Vadorequest

I have a few questions regarding the stability and production-ready usage of this plugin. I'm concerned overall about the Developer eXperience, basically the ability to debug, develop locally, how does the local env matches the production env, but also about performances and cold starts.

I've been using Next since v5, and I'm currently running v5 in production, powered by Express, which powers Next.js. I've handled cold start by using AWS Heath Checks and calling a dedicated route to warm the whole thing. Cold start take around 3-6sec, depending on the allocated RAM.

The new "serverless" approach is fundamentally different, as each page lives in its own lambda, and therefore warming all the endpoints gets complicated. But maybe it's not needed anymore because each page may render much faster than my 3-6 sec using v5. (I know Next.js has had multiple performances improvements since v5, but don't know much about it)

With my current app, I also have endpoints that aren't next-related and are handled by Express (basically, an API). I guess the new correct approach would be to have a dedicated lambda to handle those. I see two approaches:

  1. I could either have an /api endpoint powering and express server as I did before (but not related to next this time, as it'd live in another lambda)
  2. I could also use one lambda per API endpoint, but don't quite see the benefits of doing that

Also, I'm wondering how does HMR work when working locally. My current Next 5 setup is tricky. I basically have the serverless-offline that lives on :3000, without HMR. And I have the Next app that lives on :3001, with HMR. I basically dev on 3000/3001 based on whether I do front-end or back-end stuff, but that's far from being perfect and I'm really looking forward to improve that.

I guess those points are my main concerns about switching/upgrading. I'd appreciate any feedback regarding those :)

And, thanks for this plugin, that's a really great idea @danielcondemarin ! I believe it'll help bring Next to another level, because let's be honest: AWS Lambda is so cost-effective and Next is such a great React framework, it really makes sens to put those two together using Serverless and it's a wonderful way to have a ready-to-deploy app in a matter of minutes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions