1

I'm creating a service on appengine that feeds back measurements to the user. The measurements are collected by polling another server every fifteen minutes (the user needs four measurements over the last hour). The other sever replies with the data immediately so this isn't a "long poll request". I don't expect there to be a high load on the server because there aren't a lot of users (maybe 20 requests a day or so) so there won't be many requests coming in for the data, but because the user needs data over the last hour I am forced to poll continuously. This makes me concerned about billing because the new billing system charges per instance hour at a 15 min granularity and this would mean I'd have an instance actively running 24/7 (as far as I can tell).

Question

So, I expect a low request rate and am not too concerned about latency etc. How can I optomise this setup for the lowest possible billing?

What I had planned

What I was planning to do was try and get away with the free quota for now by setting max idle instance to 1 and only using the frontend to do both polling and serving (I'm guessing site responsivness will suffer a fair amount) because the frontend has far more free instance hours (28) than the backend (9). Can the frontend even be set up to poll every 15 mins?

Mark Silberbauer
  • 917
  • 1
  • 8
  • 13
  • How long does your request to other server take? I do not yet fully understand if you have to do a long-polling request to other server from appengine, or your users long-poll to your application. Also, have you seen this question: http://stackoverflow.com/questions/3616145/is-long-polling-possible-in-google-app-engine - I think it is related. – Ski Dec 19 '11 at 14:10
  • @Skirmantas No, it's not a long poll. I just need measurements every fifteen minutes and the users will be shown the last four when they access the site. Thanks - I've edited the post to clarify. – Mark Silberbauer Dec 19 '11 at 17:02
  • 1
    You're probably within the free quota, but beware also that the DataStore daily quota is very low, use memcache all the time. However if you are creating or updating more than a few thousands entities a day, you're likely to be out of the free quota. – stivlo Dec 19 '11 at 17:06

1 Answers1

1

There's nothing you can really tweak here for this. You'll want to use cron or the task queue for the polling anyway; these use frontend instances, not backend instances. As long as you have multithreading enabled, frontend latency will not be affected, and you'll likely remain within your free quota as long as you don't do enough polling or get enough traffic to require more than one concurrent instance.

Nick Johnson
  • 100,655
  • 16
  • 128
  • 198