The Google app engine cannot create task queues more than the back end instances defined in backends.yaml in a Google app.

I defined the backend configuration as follows.

backends: - name: mybackend class: B8 options: public, dynamic instances: 6 

And Um creates more than 6 instances of taskqueue and sets a goal for my backend.

  class TestHandlerTest(RequestHandler): def get(self): for x in range(0, 100): taskqueue.add(url='/testhandler/', method='GET', params={'x': x}, target='mybackend') return Response() class TestHandler(RequestHandler): def get(self): time.sleep(420) x = self.request.args.get('x') return Response() 

In the GAE task, only the queue in the queue with 6 instances of the task. It will not work until 100. If we use the front ends, then the task is in line with all the tasks.

Why can't we queue more than the specified limits for the backend instance in the Google engine? Can anyone help?

+4
source share
1 answer

You have configured 6 backend instances. You can add as many push tasks as you want for these backends. To do this, you need to configure the target instance for each task to be added. So, target = '1.mybackend' for the first instance and "2.mybackend" for the second backend inatnce.

0
source

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


All Articles