A few days ago, the Federal Government of Nigeria launched a project dubbed N-Power that, in its own words, seeks to 'empower Nigerian Youths for Prosperity'. While this is a laudable initiative, the main contact point for the project — its website - isn't very good. Aside the fact that it takes an insane amount of time to load, the website crashes under pressure.
The website is meant to connect Nigerian youths seeking jobs. For context, the unemployment rate in Nigeria stood at a staggering 12.1% as of March 2016, up from 10.5% in the fourth quarter of 2015. For a country of approximately 180M people, these numbers give an indication of just how much load this website will have to deal with. In the first few days of its unveiling to the general public, a record number of 400,000 registration took place successfully in the first 36 hours, and according to a statement issued by the SSA to the Vice President on Media and publicity, the website has gotten over 35 million visits thus far. Impressive.
Nigeria's Unemployment Rate | Trading Economics
While the number of successful registration is impressive, it pales in comparison to Nigeria's unemployment numbers. The website experiences extended periods of downtime, which means that many youths who want to register are met with an error screen. If this problem is not checked soon enough, it could render the project dead on arrival.
I admire the government’s effort and intention to help solve the unemployment problem, but good intentions aren’t always good enough, you have to do more. Some prospective registrant have taken to Twitter to vent their frustration on the inaccessibility of the website. The whole purpose of this exercise is defeated if people can’t use it.
Ts site can’t be reachedhttps://t.co/qFTy1FugOx took too long to respond.— Progressives e-News (@ProgressivesG) June 15, 2016
Search Google for npower gov ng login
what kind of website that been created for https://t.co/yMwEARPPj8. always no working— Umar-Aliyu (@umaraliyumusa) June 15, 2016
In my opinion, the website could and should have been better managed. First of all, in a world where cyber security is becoming a major issue, logins and registrations pages must have SSL enabled. This is something I found lacking on the website.
A website of this nature is guaranteed to have hundreds of thousands of visitors and proper load and stress testing should be part of its development life cycle. There are lots of tools that can help with this; Apache Benchmark, Locust and Siege come to mind. Not just that, the average response time of this website is about 70 seconds. This is unacceptable.
The different tiny images on the website could have been made into a sprite, there is no point in loading logos of the stakeholders individually. This will further reduce the round trip and create a better experience. Aside from minifying the static contents, serving them through a CDN (content delivery network) is something that should really be considered. It takes a total of 46 round trips and a content size of 5MB to get the entire website to display.
Network request of the N-Power website
High availability is non-negotiable for a website of this nature, as such, a failover of a single node shouldn’t take down the entire website. A load balancer such as HAProxy or Amazon’s Elastic Load Balancing could have been used here with all the web nodes sitting behind it. This will help disperse the load across multiple machines leading to a more resilient website.
Depending on the architecture, putting the web server and a database on the same machine isn’t a wise decision, nothing leads to a single point of failure like this setup. Separating the web node(s) from the database is almost always advisable and always replicate the master database. Always.
Frequently accessed pages should be cached, depending on the content type, a tool like Varnish is highly recommended and expensive queries should be cached. Redis and Memcache are great candidates for this task. And don’t forget to index the database tables. I can’t overemphasise the upside of this.
Monitor and measure everything, a high CPU throughput should trigger an alert to responsible parties. New Relic is an excellent server monitoring tool and for an open source equivalent, Nagios comes to mind. The rule of the game here is measure and monitor.
Cover Image by Pedro VeraShare this via: