Been building a site recently which although quite small now will eventually grow to be quite large. When your originally building a site you tend to have a relatively small amount of data. This means you can ‘get away with/accidentally produce’ some less than optimal SQL queries. Its quite difficult to tell where your site will fall down or perform slowly when it has a more realistic amount of data. Or under a more realistic multi user load which by definition as a lone developer its quite hard to simulate.
I tried load testing the site with a relatively old style tool called siege mainly because its quite simple to set up. Sieges makers describe it so
Siege is an http load testing and benchmarking utility. It was designed to let web developers measure their code under duress, to see how it will stand up to load on the internet. Siege supports basic authentication, cookies, HTTP and HTTPS protocols. It lets its user hit a web server with a configurable number of simulated web browsers. Those browsers place the server “under siege”.
You just give it a text file with a list of urls and the POST/GET requests you want made to them, then specify the number of users and how long you want the site sieged for. Then just leave it running at the end of a run it tells you, how many requests it made, how many were unsuccessful etc. Not lots of data but enough to be useful. Mainly I was interested in slow performing SQL so I left my MySQL logging slow queries.
I left siege running for 5 hours whilst I was out and then came back to see how it had gone. Obviously its not absolutely accurate as to what ‘real users’ will do but its a starting point. I found some useful issues that I could then use to target which queries were performing badly. Problems came up where I had never expected. It gave me a chance to improve the performance of some queries before they cropped up in the wild. Also allowed me to check my other queries with a reasonably sizeable set of data.
One thing I did come up though if you do want to set up a relatively long running test like this you probably want to set up any logs your writing on your test server to rotate otherwise like me you will end up with some massive text files that are quite difficult to deal with. But that was OK because I got something large to chuck at splunk …
Obviously you should only do this at your own server/test server otherwise you will just be evil.
bluerghh comment spam. Seem to be getting a fair bit of spam recently never sure if its some clever bot or a human.
Some comments are obvious spam, people whose mother called them ‘lean mean griller’ was obviously destined to have a website selling grillers. This is spam simples. Although its a bit dumb why would my site have any authority on that at all someones just wasting there own time as well as mine.
Often though the content seems generated by a machine they pick key words out of post. I was reading about markov chains sounds like that would be the way to go if you were trying to generate human sounding content. Perhaps if I read a bit more I can reverse engineer them as a sort of spam detector.
Often though I wonder if the commenter is actually a human its just that they are writing in their second language. So they phrase things a bit oddly which is fine/dandy I’m sure I would if I was trying to comment on someones blog in something other than my first language.
So I try to be positive towards them. I know some people just delete all comments but I’m happy to talk to anyone just not bots or people whose parents named them after seo terms, products or dating sites (1).
Anyway I’ve written a really simple WordPress plugin to represent the percentage of comments that are Pending, Approved, Spam or Trash. It’s output will update as more comments come in. I cleared a load of trashed ones out so the results seem a bit off at the moment.
Incidentally it will be quite fun to see how much spam I get on this post :D, how smart are the bots?
ps: if you want a name for your child here are some neat ones for boys: ichabod, octavius, titus, elastic, borin for girls: cornelia, precious.
We design websites to help you achieve your business aims. We built a site for a swimming school in St Albans. Its never going to be the new facebook but it answers the need.
The client wanted to get a website to advertise her business. We added pages about frequently asked questions, so she doesn’t have to keep answering the same questions again again.
We added a sessions calendar so she can update the dates and times of her swimming sessions. Then the parents can download the sessions calendar to stick to their fridges.
We built the site using a mainstream cms so as to save her the expense of maintaining a custom cms. Unless you have very specific requirements your usually better off using a mainstream product.
The design matters to a limited extent. They want to look professional and solid but they aren’t a design business. So we didn’t waste ages on a design just to please ourselves.
We showed them how to update the site and now they can change the session times and add new text and images as things happen and pictures become available.
Websites are just tools that we make available for clients to use.