4 ms·
I really don’t understand this sentiment, it is extremely easy to build and deploy Next.js yourself?? You either: - Build static files and host it like any ot
by Tehnix 3y ago
I really don’t understand this sentiment, it is extremely easy to build and deploy Next.js yourself??
You either:
- Build static files and host it like any other framework (e.g. throw it in an S3 bucket)[0]
- Or, run a Node.js server
Where’s the Vercel exclusive part there?
[0] Here’s me doing exactly that, going through the same steps I would for literally any Frontend framework, including the WASM alternative I also build in the post (exact same deployment) https://codetalk.io/posts/2023-10-16-the-stack-part-3.html#next.js https://codetalk.io/posts/2023-10-16-the-stack-part-3.html#n...
- lwhi 3y agoExactly, I thought I was missing something.
- poisonborz 3y agoWell that's the problem, you will not see the glass wall until too late. For my case, that you can add API middleware, but you can't run any "not edge compatible" code because of Vercel reasons.
- ervine 3y agoIt's easy but there are decisions made that hamstring you - like being unable to change cache-control headers in the next.config.js or middleware or have your middleware use node APIs, which is especially stupid because when self-hosting... it's running in node! They are optimizing for deploying to the edge, which when self hosting you don't need to. So whether malicious or not, their guard rails conveniently make it frustrating to self host once you need to do anything outside of their garden.
- leerob 3y agoMiddleware works when self hosting. It's runtime is a subset of Node.js, since it's potentially running in front of every request in your application. We're still evaluating options here: https://github.com/vercel/next.js/discussions/46722#discussioncomment-6709529 https://github.com/vercel/next.js/discussions/46722#discussi...
- ervine 3y agoI never claimed middleware doesn't work when self hosting. I claimed that it's not as useful as it could be, because your company has prioritized edge deployments over supporting self-hosting. As someone in that discussion rightfully says: "We are grown-ups with access to the same tracing and profiling tools as you. There is nothing dangerous about us using Node.js as far as I’m concerned." Additionally, your comment just reeks of PR to me. I don't know if you do it on purpose or what, but to read my comment and then come back with "Middleware works when self hosting"... it has to be intentional on your part to misunderstand my comment that badly.
- verdverm 3y agoWe put nginx in front to manage the cache headers. My biggest gripe is that they made design decisions that are optimized for their paid products, at the expense of the open source. Middleware is the main example, because it has to run on their edge.platform, it has no routing association. For all the magic they do, they dropped the ball here, making you use regex to decide of middleware should be applied. All this because users were getting hit with surprise bills, which is.really a product of who they architected and charged, not a technical issue
- jitl 3y agoI helped stand up Notion’s marketing site (https://notion.so/product https://notion.so/product) on NextJS. It’s really annoying / impossible to implement all the fancy caching, incremental revalidation, etc if you need to run more than one instance to serve the load you get. Or you need a horrendously complex AWS buzzword graph that will kinda sorta do the things. We switched from AWS ECS deployment to Vercel after tiring of figuring out how to support Next features that require very tight cooperation from CDN/distributed cache magicks. The total product is good, the web presence team is happy with Next and Vercel, I’m liking RSC and server actions, but I wanted to share my experience that beyond modest scale running Next yourself needs a lot of effort.
- ushakov 3y agoCurious whether you considered any other frameworks?
- jitl 3y agoSite predates Astro, Remix, etc. There was some interest in Gatsby but I said no (seems horribly over engineered, adds GraphQL for no good reason, like storybook promises a lot but seems to leave the team doing extreme amount of npm upgrade work). I think Next was the clear winner, we knew what we were getting into with hosting it to some degree and it was still worth because of how well it fits the team.
- satvikpendem 3y ago> We switched from AWS ECS deployment to Vercel after tiring of figuring out how to support Next features that require very tight cooperation from CDN/distributed cache magicks. I guess that's how they get you, by making it onerous to self host and instead offering a clean yet more expensive solution.