Showing posts with label Cost. Show all posts
Showing posts with label Cost. Show all posts

Saturday, October 1, 2022

Azure Cost Optimization - Tips

 It is very important to have tight control of the cost and manage it efficiently.  Cloud Computing has two major tasks. i.e. Store Data and execute code. Networking is an essential element used to tie systems together and implement security.

 Below are some of the tips that can help teams who are looking to optimize costs.

Compute Charges

Compute services are those that take your code and execute it in the cloud. There are several compute resources (around 20) in azure. All these services have virtual machines as their core. Examples are AKS, VMSS, etc

 


 Storage Charges

 

Type

Description

Key points

Factors impact storage cost

Unmanaged Storage

It relies on the user to monitor and react to the accounts
Blobs, Files, Table Data, Queue messages

The storage account has a maximum capacity.  5 PiB

GB's Used

It has Operations per second limit

IO Operations

Violations will get errors but the advantage is paid for what you use

Region

Nothing will be changed if no data is in a storage account

Redundancy

Unmanaged storage is extremely cheap

Access tier(Premium, hot, cool, Archive)

Managed Storage

 

 

 

 

Managed disks. Used by VM's

premium disks are very expensive

 

 

e.g.: HDD, (Sold  Premium, Ultra) SSD

 

 

 

Guidelines and recommendations for optimizing storage cost.

Total Storage cost covers the cost to store data and the cost to perform file operations

Costs to store files

Cost to perform File Operations(listing, writing, reading on storage accounts)

Are you storing log files for many months that you may not need?

If you expecting millions of reads and writes per month, it might be cheaper to use a premium storage tier that hot one

Are you storing memory dumps?

Premium storage is used more for storage and less for access. Recommended

·        Production load Premium disks,

·        Standard disks - for QA/Dev

Are you storing System backups from years/months ago with no regulatory reasons to keep them

if a file is placed in the cool tier, it will be charged for a min of 30 days even if you delete before then

if you delete VM, ensure deleting associated DISK

 

Sometimes, People enable read access geo-redundant storage which is 3 or 4 times of local redundant storage.
Do you use a secondary endpoint for read purposes? If they just wanted in a different region, then why not use GRS instead of RAGRS?

 

Premium charges most for storage but charges less for reading, if storage performance is a primary concern then select premium, if this file is not used frequently then it should move to the cool tier. If you don't need that file, you can reduce costs further by moving to the archive

Redundancy impacts costs - LRS is cheap and RA-GRS is expensive.
Reserve storage if you use more than 100 TB of data and save 30% of the cost

 

Other Services

 

App Service

Are you creating different appservice plan for multiple webapps


Creating different app service plans may not be needed. Create it only when there is capacity requirements

AKS

 

Dev, Test, and non-business hrs. reduce to zero instance cluster

Networking

single app gateway can host multiple applications

same with respect to WAF

Media Services

streaming can be standard and premium

98% of workload standard is fine, encoding can be done  2 ways

App Insights

data ingestion

90 days is free, enables data sampling(50%/75%), Keep  a daily cap on data

Log Analytics

 

Leverage Reserve capacity for data ingestion

 

 

Claim Based Authorization

  1.      Claim Based Authorization ·         Token Validation: As requests come into the Ocelot API Gateway, the first step is to validat...