Ok, it was approx. 1 second.

I made an script to hit the instance within a random of 1 second.

My app.yaml contains the default settings.

application: ip-engine
version: 1
runtime: python27
api_version: 1
threadsafe: yes

# Handlers define how to route requests to your application.
handlers:
- url: .*  # This regex directs all routes to main.app
  script: main.app


*My question is*: if my test show that it handles far more than 47k request 
(at ~1 per second), should I ping my instance to work like that? 
Instead of letting it spin down, where I have the risk of reaching the 
quota with only ~186 requests 15 minutes between each (considering those 
limits)


El lunes, 25 de enero de 2016, 17:53:29 (UTC-3), Alex Martelli escribió:
>
>
>
> On Mon, Jan 25, 2016 at 12:11 PM, Aldo Suarez <[email protected] 
> <javascript:>> wrote:
>
>> So, I can set min_idle_instances in app.yaml instead of ping the instance 
>> every 5 mins. Is it right?
>>
>
> Yes, but a new to-be-idle instance will get started each time the 
> previously idle one becomes non-idle, to drive you back to your desired min 
> idle instances (1) from 0. So it's unlikely to achieve your purpose.
>  
>
>>
>> I actually made a test. I hit my instance *every second*. My daily quota 
>> ends in 8 hours, and I've consumed 16,29 of 28 instance hours in 47.165 
>> requests. It's worth to say that I'm only returning a "hello world" 
>> message, nothing heavy. 
>>
>
> Can you show the relevant sections of your app.yaml and cron.yaml?  47k 
> requests, 1 per second, maps to 13 hours -- which matches neither the 8 nor 
> the 16.29 hours you report.
>
> Alex
>
>>
>>
>>
>> El domingo, 24 de enero de 2016, 21:08:21 (UTC-3), Alex Martelli escribió:
>>>
>>> On Fri, Jan 22, 2016 at 12:59 PM, Aldo Suarez <[email protected]> 
>>> wrote:
>>>
>>>> Manual scaling provides 8 frontend hours per day, not 28.
>>>>
>>>
>>> Yep, that's the total for manual plus basic scaling (in addition to the 
>>> autoscaling 28 instance hours -- there is no such thing as "frontend 
>>> hours").
>>>  
>>>
>>>> I also read that the instance shuts down after 15 minutes of 
>>>> inactivity, is it true/false?
>>>>
>>>
>>> Absolutely not for manual and basic scaling modules: *those* instances, 
>>> idle or not, only go away when explicitly requested to (with the Modules 
>>> API, e.g 
>>> https://cloud.google.com/appengine/docs/python/refdocs/google.appengine.api.modules.modules
>>>  
>>> , possibly mediated via the appcfg command-line tool).
>>>
>>> For autoscaling modules, idle instances normally go away (a little bit 
>>> earlier than after 15 minutes of idle time, in general; you're charged for 
>>> 15 minutes as an approximation of the costs of provisioning and recycling 
>>> instances); but you can control that -- in particular, you can force one 
>>> idle instance to remain at all times by setting the min_idle_instances 
>>> value to 1. Of course that one idle instance will then idly consume 24 
>>> hours per day (if it's the smallest instance class), leaving only 4 hours 
>>> per day for NON-idle instance time within the free quota.
>>>
>>>
>>> Alex
>>>
>>>
>>>>
>>>> El viernes, 22 de enero de 2016, 15:10:49 (UTC-3), Nicholas (Google 
>>>> Cloud Support) escribió:
>>>>>
>>>>> I would suggest you use manual scaling to accomplish your goal of a 
>>>>> (mostly) indefinitely running instance. This article about 'Instance 
>>>>> uptime 
>>>>> <https://cloud.google.com/appengine/docs/python/modules/#Python_Instance_uptime>'
>>>>>  
>>>>> states the following:
>>>>>
>>>>>> *App Engine attempts to keep manual and basic scaling instances 
>>>>>> running indefinitely.*
>>>>>
>>>>>
>>>>> The 'Scaling and instance types 
>>>>> <https://cloud.google.com/appengine/docs/python/config/appconfig#scaling_and_instance_types>'
>>>>>  
>>>>> article reveals how to configure your App Engine application to use 
>>>>> manual 
>>>>> scaling. If you have a single instance running indefinitely, it should 
>>>>> only 
>>>>> consume ~24 instance hours thereby running all day each day barring 
>>>>> required shut downs and start ups.
>>>>>
>>>>> On Friday, January 22, 2016 at 3:17:29 AM UTC-5, Aldo Suarez wrote:
>>>>>>
>>>>>> I've read several posts about this (ex., How are frontend instance 
>>>>>> hours calculated on app engine? 
>>>>>> <http://stackoverflow.com/questions/16782136/how-are-frontend-instance-hours-calculated-on-app-engine>)
>>>>>>  
>>>>>> and I'm still wondering about it.
>>>>>>
>>>>>> I haven't got too much traffic, so my instance gets spin down and up, 
>>>>>> consuming 15 minutes of front-end hours on each start up.
>>>>>>
>>>>>> I'm grateful with Google Cloud services, however I'd like to take 
>>>>>> full advantage of my App Engine free quota. Should I ping my instance 
>>>>>> every 
>>>>>> 5 minutes? should I change my app.yaml settings? should I make a cronjob?
>>>>>>
>>>>>>
>>>>>> -- 
>>>> 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 [email protected].
>>>> To post to this group, send email to [email protected].
>>>> 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/57165362-024e-45c4-a902-1dfa14e655c6%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/google-appengine/57165362-024e-45c4-a902-1dfa14e655c6%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> -- 
>> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> 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/3b81f15c-95dd-46c6-91c2-bcd1eb9b348e%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-appengine/3b81f15c-95dd-46c6-91c2-bcd1eb9b348e%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/f1f1d331-cbf9-43d3-89f8-883976ff9b05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to