Koa.js server with low traffic, flex vs standard env

74 views
Skip to first unread message

Sean D

unread,
Jan 28, 2020, 7:12:51 PM1/28/20
to Google App Engine
Hi, I'm building a koa.js server that will handle Shopify app install requests and also database calls to Cloud Firestore from server side. I recently learned that Firebase Functions is not suitable because it deletes all cookies in Requests outside __server, which interferes which my app's installation/oAuth library.

My main concern is the start time of the server. When it is new it will not have even 1 request per minute. I hope to get it to a point where it has a few hundred requests per minute. I am ok with using an old Node.js version and the other software limitations I saw for the comparison. I am just concerned about instance startup time in low traffic settings vs the cost. I can't let someone wait 2 minutes for the server to initialize, it's too long. I want to keep costs low when the app is new and not getting any traffic. What environment do you guys recommend in this case between standard and flex?




Jad El Houssami

unread,
Jan 29, 2020, 3:12:01 PM1/29/20
to Google App Engine
The standard environment seems to fit your needs a lot more, though you will have to settle with using Node.js as you mentioned since Koa.js is not supported.

App Engine standard will provide you with a quicker instance startup time (seconds) compared to flex (minutes). It’s also ideal if your app requires rapid scaling to a few hundred requests per minute. Lastly, it’s intended to run at minimal cost when the app is not getting traffic, it can even scale to zero instances. For more information, I invite you to visit this page which compares the two environments and their costs.

I can understand how tricky it may be to decide between the two environments so please feel free to write back if you have any more inquiries.
Reply all
Reply to author
Forward
0 new messages