Google App Engine Task Queue

I want to run 50 tasks. All these tasks perform the same code. There will be only differences. What will be done faster?

and. Queue up to 50 tasks in a queue

b. A queue of 5 tasks in 10 different queues

Is there an ideal number of tasks that can be queued in a queue before using another queue?

+3
source share
4 answers

The speed of task execution depends on two factors: the number of instances of your application and the speed of the queue.

100 , , . , . , .

+3

50 10 , . , 10 , 3300 , . 45 , , .

0

. , . , :

queue:
- name: big_queue
  rate: 50/s
  bucket_size: 50

, .

. http://code.google.com/appengine/docs/python/config/queue.html#Queue_Definitions .

, , .

0

mix- concurrency. ( 30 ), AppEngine, , (, 7-8).

In SDK 1.4.3, there is a parameter in your queue.xml and appengine-web.config that you can use to tell AppEngine that each instance can handle several tasks at once:

<threadsafe>true</threadsafe> (in appengine-web.xml)
<max-concurrent-requests>10</max-concurrent-requests> (in queue.xml)

This solved all my problems with completing tasks too slowly (despite the fact that all other parameters of the queue were maximized)

Learn more (http://blog.crispyfriedsoftware.com)

0
source

Source: https://habr.com/ru/post/1794608/


All Articles