How to handle NFR in GCP
- Anand Nerurkar
- Jun 28, 2022
- 3 min read
Updated: Oct 1, 2022
NFR
Resiliency
Availability
Scalability
Performance
Security
Availability
Are the applications available when the users need them?
Percentage of time an application provides the operations expected of it
Example: 99.99% availability.
Availability Table

Below factors to be considered
Think about your business location where most of the business taking place, your business may be regional or global and according application scope would be
Regional Application (Multi Zonal)
Global Application (Multi Region )
For Example :
Say business is conducted out of Asia Region- multi zone like mumbai, delhi,singapore, taiwan.
we can deploy application in Asia region and multi zone like mumbai , delhi and say taiwan. If mumbai zone goes down, we have other 2 zone still available ,serving the asia traffic.
Let us say business is conducted out of Asia, US and Europe Region
we can deploy application in Asia, US, Europe region and within each region we can select multi zone. This make sure that if one zone goes down in a region, other zone will be available to serve the traffic. If one region goes down, other region available to serve traffic.
how those traffic will be routed is taken care by Global/Regional Cloud Load Balancing.
Highly Available Architecture:
Multiple Regional Instance Groups for each Microservice
Distribute Load using a Global HTTPS Load Balancing
Configure Health Checks for Instance Group and Load Balancing Enable Live Migration for VM instances

Scalability:
Vertical Scalability
Horizontal Scalability
A system is handling 1000 transactions per second. Load is expected to increase 10 times during peak timing, Can we handle traffic without any drop in performance?
Does ability to serve more growth increase proportionally with resources? Ability to adapt to changes in demand (users, data)
What are the options that can be considered?
Deploy to a bigger instance with bigger CPU and more memory
Increase the number of application instances
setup a load balancer
Vertical Scalability


Deploying application/database to bigger instance:
A larger hard drive
A faster CPU More RAM, CPU, I/O, or networking capabilities
But there are limits to vertical scaling, so we prefer Horizontal Scaling.
Horizontal Scalability
Deploying multiple instances of application/database (Typically but not always)
Horizontal Scaling is preferred to Vertical Scaling: Vertical scaling has limits Vertical scaling can be expensive But Horizontal scaling increases availability (BUT) Horizontal Scaling needs additional infrastructure: Load Balancers etc.
Horizontal Scaling for GCE VM
Distribute VM instances
in a single zone
in multiple zones in single region
in multiple zones across multiple regions
Auto scale: Managed Instance Group (s) Distribute load : Load Balancing
Security
Use Firewall Rules to restrict traffic
Use Internal IP Addresses as much as possible
Use Sole-tenant nodes when you have regulatory needs
Create a hardened custom image to launch your VMs
Performance
Choose right Machine Family for your workload
Use GPUs and TPUs to increase performance
Use GPUs to accelerate machine learning and data processing workloads
Use TPUs for massive matrix operations performed in your machine learning work
Prefer creating a hardened custom image to installing software at start up.
Resiliency - "Ability of system to provide acceptable behavior even when one or more parts of the system fail"
Build Resilient Architectures
Run VMs in MIG behind global load balancing
Have the right data available
Use Cloud Monitoring for monitoring
Install logging agent to send logs to Cloud Logging
Be prepared for the unexpected (and changes )
Enable Live Migration and Automatic restart when available
Configure the right health checks (Disaster recovery) Upto date image copied to multiple regions
Comments