If you are on a mult-threaded platform… you can achieve this by just adding a Wait to the people you want to run slower. That will free CPU for the other request.
When you go over 8 requests per instance this will have less effect, but generally how it works is
User 1 Process start:
User 1 runs until you hit an API
User 2 Starts:
User 2 runs until you hit an API
User 1 Resumes:
User 1 runs until an API
User 2 resumes:
User 2 runs until an API
User 1 finishes
User 2 finishes
If you insert Pause/wait/DoNothing Spacers in your code that are condition on the QoS of the user then the non-delayed user will get priority.
I do a similar trick to make certain that low priority requests don’t cause high priority requests that are near the timelimit from finishing.
Better to know that you can serve 100 small tasks and only hit 75% CPU than to have a big task drop because small tasks ate all the CPU.
From: google-a...@googlegroups.com [mailto:google-a...@googlegroups.com] On Behalf Of David Hardwick
Sent: Thursday, July 26, 2012 8:17 PM
To: google-a...@googlegroups.com
Subject: [google-appengine] Re: Differentiated service with Google App Engine
If you put in a feature request to have more than one app access the same datastore natively, then I will surely start that issue!
On Thursday, July 26, 2012 3:11:48 PM UTC-4, rerngvit yanggratoke wrote:
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/cs1aYijZARwJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/-mTVi29GpDwJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/F8SZuWOop_EJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
This shouldn’t increase your number of instances in most cases. The threading will mean that you prioritize the other threads by putting wait states in for the less important ones. There is some overhead, but not much.
And if you only insert small waits through out the app, you just give the other threads a chance to run 10ms becomes a minimum time to wait, and if you put it each 3rd of the way through your code, you add 30ms minimum to a low priority user, and you guarantee that your high priority user gets opportunities to barrel through.