Hello Akarshan Sonkar
If you're only planning for testing, consider using the lower tiers of Application Gateway, like Standard V1 or V2 SKUs, which are typically less expensive.
There are no upfront costs or termination costs associated with Application Gateway. You're billed only for the resources pre-provisioned and utilized based on actual hourly consumption. Costs associated with Application Gateway are classified into two components: fixed costs and variable costs. Actual costs within each component vary according to the SKU being utilized.
Refer: Application Gateway pricing to estimate costs before provisioning resources.
You can configure a smaller number of instances if traffic is low. Remember that Azure charges based on the number of instances you provision, so scaling down can help save money.
For non-production, use 1 instance unless scaling is needed.
Depending on the tier you choose, there may be free data processing up to a certain threshold (e.g., the medium tier provides free data processing for the first 10 TB/month). Be sure to monitor your usage to maximize this benefit.
A stopped Application Gateway instance doesn't incur costs. Application Gateway instances that continuously run can incur unnecessary costs. Evaluate usage patterns, and stop instances when you don't need them. For example, expect low usage after business hours in dev/test environments.
Use Azure Cost Management to analyze your spending and usage patterns. This can help you adjust your setups based on actual needs and avoid unnecessary costs.
Refer: Understanding Pricing for Azure Application Gateway and Web Application Firewall
Hope this helps and let me know if you need more assistance!
If the above is unclear or you are unsure about something, please add a comment below.