113 points · by leerob · 4y ago · 48 comments
We just wanted to use vercel for hosting and previews but after the quote we ended up going with aws amplify.
Disclaimer I am a co-founder
Just the frontend to write, plus a headless CMS. Freed up sooooo much dev time. You no longer need backend devs or devops for simpler sites.
We don't use Vercel either for it is slower and offers less functionality than competitors but comparing the general concept to a LAMP stack is definitely not valid.
However I have to admit that we don't necessarily run the "target" applications that Vercel was really designed for. We have a full suite of Lambda backend services that communicate with each other in VPCs and over SQS. We have scheduled executions using CloudFront and listen to events happening in several other AWS subservices.
Now, we also have two "simpler" React applications that we have actually test-driven on Vercel before, but the cold start time of functions was honestly quite horrible and detrimental in comparison, and the problem that really drove us away very quickly was the lack of integrated database and authentication solutions (e.g. AWS Amplify/DynamoDB/Cognito and Firebase/Firestore/Auth). I know about Railway and 0auth, but we have no interest in using several different providers with uncertain confidence in them just for basic application logic, especially because they don't integrate back into Vercel at all (like e.g. functions being called when a DB record changes) and seem to be more expensive than even AWS itself.
If Vercel was more like a "Heroku for serverless", and at the very least offered some of these basic features directly, and then had some good ways of connecting them together, we would potentially reconsider.
https://github.com/vercel/examples/tree/main/edge-functions
:-/
[1]: https://github.com/vercel/examples/pull/320
[2]: https://github.com/vercel/examples/tree/main/edge-api-routes
I ask because I work on VA.gov which requires FedRamped SaaS and PaaS OR on-premise installs and I don't think Vercel has either but we could use some parts of Vercel as on-prem if there were a paid on-prem support system.
VA.gov right now is a static build system (Metalsmith + Liquid templates) stored in an S3 bucket that we are working on moving to Next.js.
Here are the open source repos that make up VA.gov:
https://github.com/department-of-veterans-affairs/content-bu...
https://github.com/department-of-veterans-affairs/vets-websi...
https://github.com/department-of-veterans-affairs/va.gov-cms
Netlify functions are based on AWS lambda functions, which spin up a container with say a node.js runtime environment everytime a request (or another event) comes in, then executes the user provided node.js function within the runtime. I can imagine that handy for something like cronjobs or api requests which happen occasionally.
But using Netlify functions for things like Next.js SSR (or API routes) means, that for every single website request, a new container is setup, the function is run once, and the container is discarded. Am i right in this? Isn't that a huge overhead in contrast to a long running server process?
It's generally just a better fit for this model, which is why I'm so glad to see the approach becoming more popular and am genuinely please that Vercel's offering has gone GA. The more this model of edge computing spreads, the better. More framworks will add support, and it will be a virtuous cycle. The WinterCG work on creating a common standard for these runtimes is also a great project.
There's also a way to "provision"[2] resources to ensure that the function always stays warm, but that adds to the fixed cost, which is otherwise, near zero, if there are no requests.
[1]: https://aws.amazon.com/blogs/compute/operating-lambda-perfor... [2]: https://aws.amazon.com/blogs/aws/new-provisioned-concurrency...
Based on vercel.com/oss, it appears that most bits of the Vercel PaaS are closed source, and I don't see an on-premises hosting option. Vercel also doesn't appear in FedRAMP Marketplace search.
This is an attractive prospect for a lot of folks who want to spend their time making their apps better and not building/monitoring infrastructure. However, there are some folks who really like to build and maintain their own infra and in that case a service like Vercel might not be the best fit.