Google App Engine Frontend Instance Hours Limit Re

2019-03-18 03:29发布

I've a static html website hosted with Google App Engine Free option. I do not have any traffic to speak of as it is new site and only traffic is myself visiting the website.

I notice, with just 15 request of the homepage my frontend instance hours consumed is 5%. With this rate, I my website can serve only 300 visitors per day.

I want to know what happens when the frontend instance hours limit is reached? Will my website become unavailable to public? I read somewhere that static content is served by different servers and should still be served, as long as you don't go beyond the bandwidth limits. Is this true?

How to reduce frontend instance hours?

3条回答
倾城 Initia
2楼-- · 2019-03-18 04:18

If no instance is running than a request will cause an instance to start. Instances stay up for 15 minutes after they served last request.

So, theoretically, you could make requests every 15 min, total 96 a day and use 24 hours of instance time, out of 28 free instance hours a day.

查看更多
我只想做你的唯一
3楼-- · 2019-03-18 04:24

you can change Max Idle Instances and Min Pending Latency settings to reduce creating more than one instance. set expirations for your content. (link)

查看更多
叛逆
4楼-- · 2019-03-18 04:25

Just to clarify a bit for you. You are thinking each request consumed .05/15 of your free quota. This is your fundamental error. Each request will be served by an instance of your app. You get 28 instance hours free. Each time a request is sent, if no instance is active, one will be started and it will consume 15 minutes of this quota -- even if it just services one request. However, if you app is efficient, many thousands of requests can be served by this one instance in 15 minutes. If your app is inefficient, or you have a lot of traffic, you will end up with more than one instance running at a time. If you always have 4 instances always running, you will consume 1 hour of instance quota each 15 minutes, so your site will become unavailable after 6 hours. As noted, this is when you start playing with the min/max idle instances -- you can tradeoff response time for fewer instances. In the example, let's say you adjust Min/Max Idle and let your app's response time go up, but by doing so you reduced the number of active instances from 4 back to 1. You could then keep the site up for a full 24 hours.

查看更多
登录 后发表回答