Serverless: A community case study #8091
Replies: 12 comments 1 reply
-
Nice to see that this goes forward, and has received attention! Here are some answers to those questions listed:
So in my use cases and intended uses Keystone wouldn't be something that is accessed on daily basis, most likely not even weekly. All that times when there is no use, it could be sleeping, saving costs and reducing attack vector for site/application. |
Beta Was this translation helpful? Give feedback.
-
1. Why do you intend to run Keystone on serverless environments? 2. What does your end-to-end stack look like? 3. Where do you host your database? 4. How do you intend to keep your database latency low when you are running Keystone in serverless environments? 5. How do you plan to manage the database connection problems of serverless runtimes? |
Beta Was this translation helpful? Give feedback.
-
Thanks for opening this issue and looking forward to the future of Keystone serverless 🙂 1. Why do you intend to run Keystone on serverless environments? 2. What does your end-to-end stack look like? 3. Where do you host your database? 4. How do you intend to keep your database latency low when you are running Keystone in serverless environments? 5. How do you plan to manage the database connection problems of serverless runtimes? |
Beta Was this translation helpful? Give feedback.
-
1. Why do you intend to run Keystone on serverless environments? 2. What does your end-to-end stack look like? 3. Where do you host your database? 4. How do you intend to keep your database latency low when you are running Keystone in serverless environments? 5. How do you plan to manage the database connection problems of serverless runtimes? All in all, I have Next.js and Keystone.js working and deployed as 1 server for our production clients. Giving them an admin UI would be even better. |
Beta Was this translation helpful? Give feedback.
-
These are all great. Clearly shows the diversity in how Keystone is used in a variety of stacks and use cases. Thanks for sharing. Please keep 'em coming. |
Beta Was this translation helpful? Give feedback.
-
1. Why do you intend to run Keystone on serverless environments? Eg. Save hosting cost, etc. To easily publish test apps for our CI 2. What does your end-to-end stack look like? Eg. Keystone Server and Next.js frontend, Keystone server within Next.js routes, I only use Keystone as an API, etc.
3. Where do you host your database? Eg. Provisioned database provider like Heroku/DO, in VPC closer to my server, etc. K8S 4. How do you intend to keep your database latency low when you are running Keystone in serverless environments? Eg. By using a managed database from the same serverless provider (Lambda and RDS). Not an issue as it won't be for production 5. How do you plan to manage the database connection problems of serverless runtimes? Eg. By using prisma dataproxy, etc. Probably not an issue as it won't be for production |
Beta Was this translation helpful? Give feedback.
-
1. Why do you intend to run Keystone on serverless environments? 2. What does your end-to-end stack look like? 3. Where do you host your database? 4. How do you intend to keep your database latency low when you are running Keystone in serverless environments? 5. How do you plan to manage the database connection problems of serverless runtimes? |
Beta Was this translation helpful? Give feedback.
-
1. Why do you intend to run Keystone on serverless environments? We don't right now, but if it's an option and it's easy, then we would. Cost might be a good benefit. We currently use AWS Fargate to run keystone and I'd imagine Lambda would be cheaper. Our main benefit might be helping fix what is actually more of a symptom. At the moment, a keystone container currently will sometimes run out of memory and die. We believe it's due to N+1 issues and deep relationships causing a crazy number of DB queries to be run and data to be loaded. It can otherwise result in slow responses. And with the container going down, other requests in progress or other incoming requests that haven't been diverted to another container will results in errors. We're creating custom resolvers to address this when we see it, but sometimes we just need to get something out quick regardless of performance, and it results in this container dying issue. With serverless I'd imagine the collateral damage would be minimised as other requests wouldn't error out by going to the same container before a new one cycles in (or at least less of them would?). 2. What does your end-to-end stack look like? Next.js frontend that uses keystone via the graphql API. So if it was deployed in a lambda we'd need to think about how we'd access it, perhaps a simple API gateway setup or Lambda's new function URLs feature. 3. Where do you host your database? AWS RDS - postgres. Separate readers and writer instances 4. How do you intend to keep your database latency low when you are running Keystone in serverless environments?
5. How do you plan to manage the database connection problems of serverless runtimes? AWS provides db a connection proxy that we'd maybe make use of https://aws.amazon.com/rds/proxy/ |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
As a developper working for artists and non-profits institutions, I need a solution to build maintainable websites at low cost. A fully serverless Keystone CMS with the admin UI could greatly help me achieve that goal, while allowing me to use modern and flexible technologies like Prisma. One other obvious solution would be to use a provider like Xata or Airtable as a CMS and database, which would be very simple to use for users and take care of everything. This approach however lack in flexibility: I would be forced to work with a proprietary technology on a free tier that can change anytime. Migrations could also be a challenge. I come from WordPress land. Although being terrible in a lot of areas, WordPress offer some degree of flexibility and stability, as it is (relatively) easy to update and migrate to virtually any hosting service out there. I've been trying to find a replacement for it, but it is not so easy in a context where human/financial ressources are low. A serverless CMS like Keystone would check many boxes I've been wanting to check for a long time. A light and stable CMS integration with Next.js would provide me with tons of flexibility, as I can deploy it pretty much anywhere (not only serverless). Working with high-level building blocks that are coming from a trusted, open source tech like Prisma also makes me feel I won't learn something too specific that will get obsolete in six months because of the next cool thing. Last but not least, it reduce complexity by a significant margin (again, this is important due to the limited time/money ressources I have).
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hey everyone! We’re noticing an increasing amount of interest and chatter about Serverless Keystone in our community slack, GitHub issues and discussions. Serverless support is in our roadmap and we have already started experimenting with a few ideas. We’re hoping to use this discussion to get feedback from the community on what serverless means for you and what your expectations are when you think about serverless support for Keystone.
We’d appreciate your thoughts on the serverless problem space and how Keystone fits into the mental model. Here are a few questions to kick start the discussion.
1. Why do you intend to run Keystone on serverless environments?
Eg. Save hosting cost, etc.
2. What does your end-to-end stack look like?
Eg. Keystone Server and Next.js frontend, Keystone server within Next.js routes, I only use Keystone as an API, etc.
3. Where do you host your database?
Eg. Provisioned database provider like Heroku/DO, in VPC closer to my server, etc.
4. How do you intend to keep your database latency low when you are running Keystone in serverless environments?
Eg. By using a managed database from the same serverless provider (Lambda and RDS).
5. How do you plan to manage the database connection problems of serverless runtimes?
Eg. By using prisma dataproxy, etc.
Beta Was this translation helpful? Give feedback.
All reactions