Answer in Web Development for BossyGurl #260056
Scenario: ABC Supermarket is a local township supermarket based in Germiston, East rand of Johannesburg in
South Africa. The supermarket sells a wide variety of food and household products.
The supermarket takes online orders through their website and currently averages about 20 000
unique visitors to their website per day and has 10 content uploaders constantly updating their
website and making sure the site is always up-to-date. The website is in highest demand from 07:00
until 17:00 Mondays to Saturdays and very minimal activities on any other times. The website is hosted and managed locally by a small IT department of six employees. Besides not
coping with the website traffic load, the local energy supplier, Eskom has decided to implement load
shedding at different times of the day
Question A. Self-healing and redundancy(Marks: 30)
Explain any five recommendations that should be looked at related to the principles of selfhealing and redundancy in the design of the ABC supermarket module
- Retry failed operations. Transient failures may occur due to momentary loss of network connectivity, a dropped database connection, or a timeout when a service is busy. Build retry logic into your application to handle transient failures. For many Azure services, the client SDK implements automatic retries.
- Protect failing remote services (Circuit Breaker). It’s good to retry after a transient failure, but if the failure persists, you can end up with too many callers hammering a failing service. This can lead to cascading failures, as requests back up.
- Isolate critical resources (Bulkhead). Failures in one subsystem can sometimes cascade. This can happen if a failure causes some resources, such as threads or sockets, not to get freed in a timely manner, leading to resource exhaustion. To avoid this, partition a system into isolated groups, so that a failure in one partition does not bring down the entire system.
- Perform load leveling. Applications may experience sudden spikes in traffic that can overwhelm services on the backend. To avoid this, use the Queue-Based Load Leveling pattern to queue work items to run asynchronously. The queue acts as a buffer that smooths out peaks in the load.
- Fail over. If an instance can’t be reached, fail over to another instance. For things that are stateless, like a web server, put several instances behind a load balancer or traffic manager. For things that store state, like a database, use replicas and fail over. Depending on the data store and how it replicates, this may require the application to deal with eventual consistency.