Sunday 17 March 2013

Should Load Testing Continue Once My Site is Live?


The big day arrived, after months of hard work in designing, coding, testing and publishing; your website is alive and kicking. While building your website you didn’t stop testing it, time after time checked how it will respond to every action the user does. This is the cornerstone of unit testing. Knowing how specific functions will perform in isolation. If you are using the MVC framework, you probably have a test method for the every action method.  You have performed all this in an attempt to try and predict how the website will perform with a large number of concurrent users. Now the site is online and the big dilemma is upon you; do you carry on with performing the tests and mostly load testing or do you give it the benefit of the doubt and let it fend for itself(not literary).
First of all we will need to distinguish between load testing and stress testing. These two terms have often been erroneously used interchangeably. Load testing in essence works by populating the enterprise databases with data and attempting to retrieve it while observing the performance metrics. On the other hand stress testing is what actually deals with the number of concurrent users. I will not delve much into the justification of which is which more because at the end of the day I don’t see how we should have one without the other.
Let’s look at various possibilities and situations that might inform your decision to want to Load test or not.

  1. Website update frequency/magnitude
Depending on the nature of your website, the frequency at which you update your website might differ from others. For those who do it much often continuous integration is at the top of your list but this is a story for another day. Late last year I read an article in which facebook declared that they will be pushing updates twice a day. Such changes are usually in good faith mostly feature upgrades or patching up bugs. Before these upgrades the QA members of any tech team go through constant cycles of continuous testing to ensure that the right product is shipped.  On top of the normal UAT performed and possibly golden path test it would be worthy to consider performing a Load test depending on the modules that change and their impact to the business and the website availability.

  1. Underlying technology change
Your website’s infrastructure will be a defining factor on whether you will need to perform load testing. Let’s consider some examples. You have a site that is purely powered by word press. This means that to some extend you are controlled by changes made by word press and the underlying theme. If there is an upgrade then how does that update affect your websites availability? Say you use MSMQ for your distributed applications and Microsoft have made a change. Do you think that the change will affect how your sub-applications communicate with one another? Suppose you are a document database proponent and hence are already using RavenDB. If there is an upgrade you need to be able to know that your entire site doesn’t have a drop in performance.
Those are changes on the software side. You might also decide that in order to enhance performance separate your App server from your database server. They may not have a dedicated channel to each other or maybe they do. You could also change your hosting company.  As long as there is a change then it is clear what will need to be done. Integration tests as a priority but also /load test make sure potential bottleneck are identified.

  1. Strategic management
Top level managers usually will share the company’s vision with the tech team. They may outline the projected sales or customer registration. With the primary point of contact being the website you need the website to be able to support the projections when they happen. At this point the Load testing is a requirement to determine how the site will behave when such numbers are hit.
The outcome of such a test ensures that  the right decisions are made with regard to whether to start patching up loose strings in the current system,  start developing a new one or  look for a developer if you outsource your software products.

  1. Cost/Revenue justification
This factor is usually affected by the last 3 points. The question is, is it worth doing the Load testing procedure? In order to answer this question what one needs to think about is what the cost of not doing it will be. Website outages usually cost thousands of dollars worth of revenue loss. It’s not rocket science when you look at the formula here below.
(Revenue per month) X (minutes of downtime)
Such an outage can be caused by a surge in the number of customers for instance accessing your website because of a marketing program.
When you consider the kind of loss that can be experienced then that is a starting point as to whether it’s worthy to do load testing on your live site.

  1. Perceived availability
With reference to the point above consider how negatively downtime will affect your company’s image.  It’s even worse in face of customers vending their anger out in the social media platforms. Imagine that your website accepts Instant payment notification from third party payment providers. If it’s unavailable then the question of how many retries there has to be comes to play. It’s not a very good picture if the company needs business partners.  Such outage could be caused by payments coming in hundreds. Therefore here a decision needs to be made based on performing a load test beforehand to know the maximum number of notifications that can be received.

From the points above we can deduce that once a site is live that will not be the end of it. It will be subjected to changes(or at least the underlying infrastructure) and it’s these changes that will mostly determine whether or not  to load test your website. The cost aspect is always very thorny when justifying to the managers on why it needs to be done. Such a debate can be easily won by showing what stands to be lost if the site is unavailable as a result a load test that wasn’t done. I also want to acknowledge that a site could face an outage due to factors different from high numbers but while we can do something about numbers then we should hope that those other factors are taken care of their own way.

Tuesday 12 March 2013

IS KENYA READY FOR THE CLOUD?



Even though I have posed the question as the title, I will give an answer immediately and then you will wonder why I need to write a lot. Ok, the answer is no and the rest of this post will be about why I think that Kenya is not ready for the cloud.
Adoption of cloud technologies in Kenya is like getting the mason ready when you haven’t even a plan for the house. All I am saying is that its true Kenyans and especially businesses are ready for cloud technologies but the infrastructure is not there. Well maybe it might be there but then there is something about consumers getting a raw deal. It’s been more than three years since the fiber optic cable landed in the Kenyan coast. This was characterized by a euphoric feeling that the internet speeds would go up and with the prices going the other way.
I know a company whose ISP is one of the leading Telco in the country and alleged are provided with 3MBPS internet speeds. The company, as a part of its disaster recovery strategies is looking to migrate all their data into the cloud. So why does this story seem to not have a happy ever after ending?
This is why
They have never received in full the bandwidth they pay so dearly for. Whenever they call the customer support line they get all sorts of excuses. My favorite is that they are browsing so much on the secure http protocol (https). Are you kidding me? Even a novice in communication protocols knows that that statement is wrong.
If you still are wondering what being on the cloud means then think of this. You have received an e-mail with a word document attachment in Gmail. Instead of downloading the document you decide to simply open it online. Note that Google will offer you a chance to edit that document online. That means you can make changes to your document without having to download and upload it back up again. Google has just offered you a document hosting cloud service.
Now tell me how many times you open that document and are stuck at the “loading document” point with the progress bar not progressing at all.
This takes us back to the company that I was talking about. In Kenya, in order to get super fast internet (if you consider 3MBPS super fast) you will have to pay dearly for it. If you can’t then you will be stuck with the old slow internet monster. That right there is the reason why Kenya is not ready for the cloud. Not unless the government compels the main ISPs to providers a better service at cheaper cost most companies will not be able to manage a true cloud environment. So we wait to see what will happen  now that Kenyans have voted in the so called digital team to lead them, but until then I am not convinced that Kenya as a country is ready for the cloud.

Sunday 3 March 2013

Cracking a GSM modem to accept SIM cards from other providers.



If you are here then its obvious what you are here for. You have a GSM modem that is locked to accepts SIM cards from only one provider. I am talking about a case in point in Kenya where for instance Safaricom has their modems only meant to accept Safaricom SIM cards. This means that you cannot use any other provider’s SIM on that modem.
Enough with the little talk, let’s get you cracking a modem, I guess you have work pending.
1.    Download and run this tool found here.
2.    You will see this interface.

3.    This shows that the modem has been detected. Click on the RESET MODEM on service radio button group.



4.    Now go on and unlock the modem. Check Auto-Calc Code and Auto-Unlock then click on the big red button UNLOCK.

5.    The modem is now unlocked. Read some of the information it provides for more information.
NOTE:
This technique will work for HUAWEI MODEMS.
If the unlocking fails the first time, ensure that the modem software is not running and also retry.
The tool provided is free to use and full credit goes to the developers who have to connection to this blog.