Skip to content

Instantly share code, notes, and snippets.

@renoirb

renoirb/.siegerc Secret

Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renoirb/f90d0226d8882b50df0e to your computer and use it in GitHub Desktop.
Save renoirb/f90d0226d8882b50df0e to your computer and use it in GitHub Desktop.
Using Siege for load testing
login-url = http://IPADDRESS/w/index.php?title=Special:UserLogin&action=submitlogin&type=login POST mUsername=USERNAME&mPassword=PASSWORD
logfile = ~/siege/run.log
user-agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Siege/2.70
internet = true
failures = 5
show-logfile = true
verbose = true
#cache = true
#connection = keep-alive
concurrent = 140
time = 20S
delay = 5
IP='10.10.10.10'
#IP='behind.varnish.hostname.com'
PROTO=http
$(PROTO)://$(IP)/wiki/Main_Page
$(PROTO)://$(IP)/wiki/beginners
$(PROTO)://$(IP)/wiki/css/properties/border-radius
$(PROTO)://$(IP)/wiki/concepts/Pointer_Events
$(PROTO)://$(IP)/wiki/css/properties/border-image
$(PROTO)://$(IP)/wiki/concepts/accessibility
$(PROTO)://$(IP)/wiki/WPD:Projects/CompaTables/201403-sprint
$(PROTO)://$(IP)/wiki/WPD:Projects/CompaTables
$(PROTO)://$(IP)/wiki/dom/UIEvent/view
$(PROTO)://$(IP)/wiki/dom/UIEvent/activate
$(PROTO)://$(IP)/wiki/MediaWiki:Aboutsite
$(PROTO)://$(IP)/wiki/dom/UIEvent
$(PROTO)://$(IP)/wiki/svg/tutorials/smarter_svg_animation
$(PROTO)://$(IP)/wiki/svg/tutorials/smarter_svg_filters
$(PROTO)://$(IP)/wiki/WPD:Requirements/Community_Management_System
$(PROTO)://$(IP)/wiki/javascript/String/substr
$(PROTO)://$(IP)/wiki/WPD:Projects/Homepage
$(PROTO)://$(IP)/wiki/beginners
$(PROTO)://$(IP)/wiki/dom/TextRange/text
$(PROTO)://$(IP)/wiki/dom/TextRange/queryCommandSupported
$(PROTO)://$(IP)/wiki/dom/TextRange/queryCommandEnabled
$(PROTO)://$(IP)/wiki/dom/TextRange/pasteHTML
$(PROTO)://$(IP)/wiki/dom/TextRange/parentElement
$(PROTO)://$(IP)/wiki/dom/TextRange/moveToPoint
$(PROTO)://$(IP)/wiki/dom/TextRange/moveToElementText
$(PROTO)://$(IP)/wiki/dom/TextRange/boundingLeft
$(PROTO)://$(IP)/wiki/guides/the_basics_of_html
$(PROTO)://$(IP)/wiki/html/elements/input/type/button
$(PROTO)://$(IP)/wiki/html/elements/map

Using Siege to test load

Here are a few notes on how I test load resilience with Siege

Use case scenarios

Before you start, make sure you adjust your terminal with the following:

  • Install Siege

      sudo apt-get install siege
    
  • Create the suggested ~/.siegerc

    • and make sure IPADDRESS, USERNAME, PASSWORD are valid (variables doesnt work there)
  • Create folder for logs

      mkdir ~/siege/
    
  • Before running Siege, you can see the values that will be used

      siege -C ~/.siegerc
    
  • You can source the .siegerc, and overwrite the values if you want

      export SIEGERC=~/.siegerc
    

From a neighbour VM, to another VM, no Varnish

  • Set IP to a backend origin server IP address (e.g. 10.10.10.10), in urls.txt

  • Note, we set the -H to fool the web server that we are Varnish

      siege -H "Host: behind.varnish.hostname.com" -c40 -d10 -f urls.txt
    

From a remote machine, through Varnish

  • Set IP to a publicly available hostname that Varnish is listening to and would serve the same app

      siege -c40 -d10 -f urls.txt
    

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment