Static File Hosting - Performance & Logging

125 views
Skip to first unread message

Dennis Yurkevich

unread,
Jul 11, 2018, 4:55:57 AM7/11/18
to google-a...@googlegroups.com
Hello All,

When using the various static file hosting options on GAE Nodejs Flex Environment, I see the below three as the main options:
1. have the app serve on a route e.g app.use(express.static())
2. use the app.yaml config
3. use google bucket / cdn

My first question is which should be most performant? I am serving a 400kb SPA bundle.

Second, I need some flexibility which I am using the routing for, such as deciding which bundle to serve based on geo, reading the cookie header and logging. Would these things be possible with option 2 & 3?

My final question, is that the app.yaml option is this just using nginx to serve behind the scenes?

Thanks,
Dennis

Kenworth (Google Cloud Platform)

unread,
Jul 12, 2018, 10:19:37 AM7/12/18
to Google App Engine
1. Performance - because there are a lot of variables involved (content, configurations & use-cases at the top of the list), this would be better answered by testing your own application. For example, you can analyze your website using PageSpeed. 2. These may work with the use of a Load Balancer. However, serving based on geolocation is not yet currently supported on GAE Flex.

3. Yes. Whenever you are using a pre-made instance (as opposed to Custom Runtimes) on GAE Flex, it is using nginx web server.

Yasser Karout (Cloud Platform Support)

unread,
Jul 13, 2018, 3:01:26 PM7/13/18
to Google App Engine
Just for clarity, to serve static files using express.static(), you still need to specify the static URL handlers in your app.yaml file. So the first and second method you listed are the same method.

Dennis Yurkevich

unread,
Jul 15, 2018, 6:50:37 AM7/15/18
to google-a...@googlegroups.com
Hello Yasser,

Today I am serving static files using Express and without having specified the handlers in app.yaml.



--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/0465fce3-fd28-447b-a371-43898c49130d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yasser Karout (Cloud Platform Support)

unread,
Jul 17, 2018, 10:21:45 AM7/17/18
to Google App Engine
Hi Dennis,

Apologies, you are correct. Handlers are not needed in the flexible environment only in standard.
Reply all
Reply to author
Forward
0 new messages