Let's say you have a sustained traffic of 5 hits per second, and each
request takes 1 second to process (waiting on the datastore, waiting
on facebook, whatever).  If you're using single-threaded python, you
will need 5 instances to serve this load - each instance can do
nothing else while it processes a single request.

So, maybe the datastore is behaving well today and you ditched your
Facebook integration so you can complete each request in 200ms.  Now
you only need one instance to serve those 5 hits per second.

Now let's say you get slashdotted, and for a day you sustain 500 hits
per second.  You now need 100 instances.  Maybe there's a datastore
hiccup and your latency goes up... now you need 200, 300 instances.
They consume very little CPU because they spend most of their time
blocked waiting for I/O, but they sure do occupy a lot of RAM.

An efficient multithreaded (or async) server should be able to handle
this load with less than 10 instances, and I/O latency will have
minimal impact.  Additional concurrent requests consume more CPU but
they don't consume more RAM.

Nobody is complaining about $50/mo.  They're complaining about the
looming threat of $500 or $5000 per month for traffic levels that
barely register on a "less scalable" architecture.  The Google blog
says that appengine served over 2,000 hits per second for the Royal
Wedding - I'd like to know what the bill would look like before and
after the pricing change.

Jeff

On Tue, May 24, 2011 at 1:46 AM, Drew Spencer <slugmand...@gmail.com> wrote:
> Hi coders,
> Could people please correct me as I am trying to understand all this, have
> read quite a few thread/pages but still a bit unsure what is going on
> exactly. This is what I get so far:
>
> Being charged for instances means we should probably use multi-threading in
> our apps to avoid significant cost increases, so google is encouraging us to
> write apps that make more efficient use of memory.
> Python developers are piddled off because they can't use multi-threading.
>
> Can anyone enlighten me as to when an application that doesn't use
> multi-threading would require a new instance - when more than 1 request is
> happening simultaneously? When one JVM can't handle more requests? I am
> totally confused.
> I still think GAE is well worth the money. People are complaining about
> $50/month but I want my app to be making waaaaay more than that and I think
> the tools and support they provide make it way worth it. I just want to make
> sure I take all these measures into account to make my app as efficient as
> possible.
> Drew
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to