Siege - Why do I get all these responses?

1.2k Views Asked by At

I'm confused about what Siege is doing under the hood. I use Siege every now and then to create some traffic for my web services. Today I noticed that Siege lists more responses than I would have I expected.

E.g. I use Siege as

siege -c 1 -t 5s http://www.github.com/index.html

I'd expect to see only one response with the 'index.html' HTML resource. But instead I get

** SIEGE 4.0.2
** Preparing 1 concurrent users for battle.
The server is now under siege...
HTTP/1.1 301     0.22 secs:       0 bytes ==> GET  /index.html
HTTP/1.1 301     0.74 secs:       0 bytes ==> GET  /index.html
HTTP/1.1 200     0.72 secs:   84938 bytes ==> GET  /index.html
HTTP/1.1 200     0.59 secs:   25628 bytes ==> GET  /
HTTP/1.1 200     0.14 secs:   97194 bytes ==> GET  /images/modules/site/org_example_nasa.png?sn
HTTP/1.1 200     0.06 secs:    8182 bytes ==> GET  /images/modules/site/home-ill-platform.png?sn
HTTP/1.1 200     0.06 secs:   10324 bytes ==> GET  /images/modules/site/home-ill-projects.png?sn
HTTP/1.1 200     0.07 secs:   11500 bytes ==> GET  /images/modules/site/home-ill-work.png?sn
HTTP/1.1 200     0.06 secs:    6137 bytes ==> GET  /images/modules/site/home-ill-build.png?sn
HTTP/1.1 200     0.12 secs:  152050 bytes ==> GET  /assets/github-1997dc5b96e7febe96e26200e8d35ecd91516cd11316d8bbff113b04ea81b23b.js
HTTP/1.1 200     0.09 secs:   88940 bytes ==> GET  /assets/frameworks-44ae517d6facdc7480be70913e6d4abb86971b42006cf0f0dd6597b480cc272f.js
HTTP/1.1 200     0.06 secs:    6224 bytes ==> GET  /assets/compat-8e19569aacd39e737a14c8515582825f3c90d1794c0e5539f9b525b8eb8b5a8e.js
HTTP/1.1 200     0.60 secs:    2062 bytes ==> GET  /u/3777891?v=3&s=80
HTTP/1.1 200     0.15 secs:    6504 bytes ==> GET  /u/1739496?v=3&s=200
HTTP/1.1 200     0.06 secs:   12695 bytes ==> GET  /assets/site-a1797477c6773085524735a03e97c502b07acafa1b95efd6cda07775c7bb7105.css
HTTP/1.1 200     0.10 secs:   98986 bytes ==> GET  /assets/github-ac9c637b29122a4699fcd4d205b2d09efa4d4962d369158f7d907123061143f1.css
HTTP/1.1 200     0.08 secs:   21615 bytes ==> GET  /assets/frameworks-a44e0bdd1666101af23963e4027cd7a0a1eea1339e0e7422524f2e7f3900e86b.css

The first 2 are redirects, then comes the expected HTML. But why do I get all the other images, JS and CSS resources? I can't imagine that Siege actually parses the HTML and secondarily requests resources from there. I'm lost.

1

There are 1 best solutions below

0
On BEST ANSWER

HTML parsing is a feature which has been added in Siege 4.0.0.

You can edit Siege configuration file and disable response parsing. Here is an extract from the configuration file:

# Parser
# This directive allows you to turn on the html parser. With this
# feature enabled, siege will harvest resources like style sheets,
# images, javascript, etc. and make additional requests for those 
# items. 
#
# HTML parsing was added to version 4.0.0 It is enabled by default. 
# When the parser is enabled, care must be given to other features. 
# For example, we allow to set accept-encoding to anything you'd like
# but if you want to parse those pages, then you MUST set the encoding
# to a supported one.
# 
# With the default options set, you should be able to enable the parser
# with success.
#
# Use this feature to enable it. (true = on, false = off)
# 
# Example: parser = true
#
parser = true

Simply set parser = false and it disables the parser.