In your experiments with multiple backends, they are all the same
"backend" right? You're not targeting specific instances are you? In
other words, is everything targeted at "thebackend," "1.thebackend,"
or multiple different backends?
Do you see pending latencies in the request log headers? That's
where the failfast header should help. Rather than dispatch the task,
then wait for an instance to handle it, it will immediately get
returned to the queue. I don't think it is intended to prevent
instances from being spun up.
What happens if instead of backends you use front ends plus a
max_concurrent_requests equal to the number of backends you were
wanting? Does it change the behavior you're seeing?
You does the latency of the request itself impact what you're
seeing? If you do a lot more work in each request does the situation
improve?
Robert
> --
> You received this message because you are subscribed to the Google Groups "Google App Engine" group.
> 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.
>
What if you further increase the work done within each task so that
it takes, for example, 5 minutes per task?
Have you considered using pull-queues since you're running all this
on backends?
Robert
> --
> 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/-/xF79RpgjpAYJ.
Two questions will help us clarify what you're observing.
Are your tasks added transactionally?
You mention the pattern of executing a task then enqueuing another. In
the one backend case, is there typically no more than one task in the
queue?
Nick Verne
> --
> 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/-/lbNQRQdSx0AJ.
In your case, you could use pull queues to immediately fetch the
next task when finished with a task. Or even to fetch multiple tasks
and do the work in parallel. Basically you'd have a backend that ran
a loop (possibly initiated via a push task) that would lease a task,
or tasks, from the pull queue, do the work, delete those tasks, then
repeat from the lease stage. The cool thing is that if you're, for
example, using URL Fetch to pull data this might let you do it in
parallel without increasing your costs much (if any).
Robert
> --
> 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/-/lbNQRQdSx0AJ.
However, the explanations quickly become obsolete. They enter the
folklore in the form that was current at the time and become
entrenched as incorrect information when the implementations have
changed.
Task Queues use best effort scheduling. They're not real time all the
time, although when our best efforts are running smoothly they can
appear real time. For scheduling, the task eta marks the earliest time
at which the task can run. We can't guarantee that a task WILL run at
that time.
Steve, we're interested to know about the 10-20 minute delays you've
seen. Can you tell us the app id, queue, and whether the tasks were
added transactionally? An example from your logs would be very
helpful.
Nick Verne
.param("key", contentKeyString).method(TaskOptions.Method.GET));
I _very_ infrequently bump into that type of issue, but I periodically
will see one queue slow down for a while. It *seems* to happen far
more often in queues with slower tasks, but I don't have any recent
empirical evidence of that. And I *think* I've been told that should
not be the case.
Robert
The app always has front end traffic and I have noticed the delay at times with high traffic.