Git Product home page Git Product logo

locust-on-azure's Introduction

Running Locust.io on Azure Container Instances

Running distributed Locust.io (version 1.3.0) on Azure Container Instances

Article with details is here:

Running Locust on Azure

Or just run azure-deploy.sh and follow instructions. Is that easy :)

A VNet integrated deployment is available via azure-vnet-deploy.sh

Locust on Azure

You can try it right away, even if you don't have any API you can call, using JSONPlaceholder. To avoid flooding JSONPlaceholder with tons of request, the default values are set to create 1 locust client that will simulate 1 user only. The user will send a GET or a POST request every 5 to 10 seconds.

Editing .sh files in VS Code on Windows

In case you are editing .sh files in Windows, you might encounter error at runtime in WSL because of the default CRLF line ending applied. You can fix existing files with command sed -i.bak 's/\r$//' azure-deploy.sh see this discussion and if you are using VS Code you can configure line ending

locust-on-azure's People

Contributors

dabedin avatar yorek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

locust-on-azure's Issues

Master node terminated

I'm experiencing a new issue: the deployment script did not end as the master was not responding. The master ACI was in killing state, restarting it I collected the following log:

2020-11-01T18:01:36.3957911Z stderr F [2020-11-01 18:01:36,392] SandboxHost-637398500578781056/INFO/locust.main: Starting web interface at http://0.0.0.0:8089 (accepting connections from all network interfaces)
2020-11-01T18:01:36.4113665Z stderr F [2020-11-01 18:01:36,411] SandboxHost-637398500578781056/INFO/locust.main: Starting Locust 1.3.0
2020-11-01T18:01:36.4213724Z stderr F Traceback (most recent call last):
2020-11-01T18:01:36.4213724Z stderr F   File "src/gevent/greenlet.py", line 854, in gevent._gevent_cgreenlet.Greenlet.run
2020-11-01T18:01:36.4213724Z stderr F   File "/usr/local/lib/python3.8/site-packages/locust/web.py", line 391, in start_server
2020-11-01T18:01:36.4213724Z stderr F     self.server.serve_forever()
2020-11-01T18:01:36.4333933Z stderr F   File "/usr/local/lib/python3.8/site-packages/gevent/baseserver.py", line 398, in serve_forever
2020-11-01T18:01:36.4333933Z stderr F     self.start()
2020-11-01T18:01:36.4333933Z stderr F   File "/usr/local/lib/python3.8/site-packages/gevent/baseserver.py", line 336, in start
2020-11-01T18:01:36.4333933Z stderr F     self.init_socket()
2020-11-01T18:01:36.4333933Z stderr F   File "/usr/local/lib/python3.8/site-packages/gevent/pywsgi.py", line 1500, in init_socket
2020-11-01T18:01:36.4333933Z stderr F     StreamServer.init_socket(self)
2020-11-01T18:01:36.4333933Z stderr F   File "/usr/local/lib/python3.8/site-packages/gevent/server.py", line 180, in init_socket
2020-11-01T18:01:36.4333933Z stderr F     self.socket = self.get_listener(self.address, self.backlog, self.family)
2020-11-01T18:01:36.4333933Z stderr F   File "/usr/local/lib/python3.8/site-packages/gevent/server.py", line 192, in get_listener
2020-11-01T18:01:36.4333933Z stderr F     return _tcp_listener(address, backlog=backlog, reuse_addr=cls.reuse_addr, family=family)
2020-11-01T18:01:36.4333933Z stderr F   File "/usr/local/lib/python3.8/site-packages/gevent/server.py", line 284, in _tcp_listener
2020-11-01T18:01:36.4333933Z stderr F     sock = GeventSocket(family=family)
2020-11-01T18:01:36.4333933Z stderr F   File "/usr/local/lib/python3.8/site-packages/gevent/_socket3.py", line 142, in __init__
2020-11-01T18:01:36.4333933Z stderr F     self._sock = self._gevent_sock_class(family, type, proto, fileno)
2020-11-01T18:01:36.4333933Z stderr F OSError: [Errno 97] Address family not supported by protocol
2020-11-01T18:01:36.4333933Z stderr F 2020-11-01T18:01:36Z <Greenlet at 0x7f4754fa1150: <bound method WebUI.start_server of <locust.web.WebUI object at 0x7f4754f89220>>> failed with OSError
2020-11-01T18:01:36.4333933Z stderr F 
2020-11-01T18:01:36.4333933Z stderr F [2020-11-01 18:01:36,425] SandboxHost-637398500578781056/CRITICAL/locust.web: Unhandled exception in greenlet: <Greenlet at 0x7f4754fa1150: <bound method WebUI.start_server of <locust.web.WebUI object at 0x7f4754f89220>>>
2020-11-01T18:01:36.4333933Z stderr F Traceback (most recent call last):
2020-11-01T18:01:36.4333933Z stderr F   File "src/gevent/greenlet.py", line 854, in gevent._gevent_cgreenlet.Greenlet.run
2020-11-01T18:01:36.4333933Z stderr F   File "/usr/local/lib/python3.8/site-packages/locust/web.py", line 391, in start_server
2020-11-01T18:01:36.4333933Z stderr F     self.server.serve_forever()
2020-11-01T18:01:36.4333933Z stderr F   File "/usr/local/lib/python3.8/site-packages/gevent/baseserver.py", line 398, in serve_forever
2020-11-01T18:01:36.4333933Z stderr F     self.start()
2020-11-01T18:01:36.4333933Z stderr F   File "/usr/local/lib/python3.8/site-packages/gevent/baseserver.py", line 336, in start
2020-11-01T18:01:36.4333933Z stderr F     self.init_socket()
2020-11-01T18:01:36.4333933Z stderr F   File "/usr/local/lib/python3.8/site-packages/gevent/pywsgi.py", line 1500, in init_socket
2020-11-01T18:01:36.4333933Z stderr F     StreamServer.init_socket(self)
2020-11-01T18:01:36.4333933Z stderr F   File "/usr/local/lib/python3.8/site-packages/gevent/server.py", line 180, in init_socket
2020-11-01T18:01:36.4333933Z stderr F     self.socket = self.get_listener(self.address, self.backlog, self.family)
2020-11-01T18:01:36.4343783Z stderr F   File "/usr/local/lib/python3.8/site-packages/gevent/server.py", line 192, in get_listener
2020-11-01T18:01:36.4343783Z stderr F     return _tcp_listener(address, backlog=backlog, reuse_addr=cls.reuse_addr, family=family)
2020-11-01T18:01:36.4343783Z stderr F   File "/usr/local/lib/python3.8/site-packages/gevent/server.py", line 284, in _tcp_listener
2020-11-01T18:01:36.4343783Z stderr F     sock = GeventSocket(family=family)
2020-11-01T18:01:36.4343783Z stderr F   File "/usr/local/lib/python3.8/site-packages/gevent/_socket3.py", line 142, in __init__
2020-11-01T18:01:36.4343783Z stderr F     self._sock = self._gevent_sock_class(family, type, proto, fileno)
2020-11-01T18:01:36.4343783Z stderr F OSError: [Errno 97] Address family not supported by protocol
2020-11-01T18:01:36.4343783Z stderr F [2020-11-01 18:01:36,426] SandboxHost-637398500578781056/INFO/locust.main: Running teardowns...
2020-11-01T18:01:36.9293872Z stderr F [2020-11-01 18:01:36,929] SandboxHost-637398500578781056/INFO/locust.main: Shutting down (exit code 2), bye.
2020-11-01T18:01:36.9293872Z stderr F [2020-11-01 18:01:36,930] SandboxHost-637398500578781056/INFO/locust.main: Cleaning up runner...

Any idea on this?

Files from /locust share does not get used

While attempting to change the behavior of azure-deploy.sh to upload a directory (my test upload a file via post) It seemed my edited locustfile.py did not get used: regardless of my test being a POST, a fresh deployment of Locust continued to report GET /customer/[id] as 100% of failures, as my host does not support GET.
My edited locustfile.py and additional file is in the Storage Files share, connecting to a slave ACI I can see the mounted /locust share, in which my files listed, and a default locustfile.py is present too.
locust_aci
How can I configure the master&slaves to use the files in the /locust dir instead of the locustfile.py coming from the docker image? Any hint would be appreciated

Workers Don't Scale with the Load

I used the template to set up 3 workers and containers. When I input a large load on locust like 10,000 users to be simulated, I noticed 5 workers were required instead of 3. So I had to redeploy everything to increase the number of workers.

It would be great if the workers could automatically scale with the load so that redeployment is not required.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.