Avoid using try...catch...finally
Avoid calls to try…catch..finally in resource-heavy areas of code (some loops, generation of complex data, etc.). When an exception is thrown, a variable (the exception itself) is created at the start of the catch clause and destroyed at the end. Creating and destroying this variable unnecessarily uses CPU power and RAM. Hence why it is important to replace this construction with a logic test as often as possible.
Adapt the quality of service and the service level agreement
Electricity consumption
The Quality of Service (QoS) and the Service Level Agreement (SLA) must be outlined with the website or online service’s users. For example, there is no reason to host the service in a high-availability data center (Tier IV) if the users are prepared to accept an availability of equal to or under 99% for a non-critical service. With equal energy efficiency, the more data center hosting the website or online service is available, the larger its overall environmental footprint. This is primarily because everything is mirrored and active, with dual-powered electricity and dual-powered cooling systems, etc.