title: Azure Application Gateway hitting 504 Gateway timeout randomly while doing JMeter load test
body: <p>I have 1 application gateway which having 2 backends (Azure VM) which is hosting ASP CORE REST API with IIS. And both is using port 80 to communicate.</p>
  <p>Everything is working fine with manual test until when we use jmeter to do 2500 Threads POST request load test, some of the request get &quot;504 gateway timeout&quot; as response.</p>
  <p>I tried to run the exactly same load test towards the backend straight and didnt received any bad response.</p>
  <p>Am i misconfigured something on my application gateway?</p>
  <p><strong>Configurations</strong>
  <a href="https://i.stack.imgur.com/RVZ4q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RVZ4q.png" alt="Configurations" /></a></p>
  <p><strong>HTTP Settings</strong>
  <a href="https://i.stack.imgur.com/24kZM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/24kZM.png" alt="HTTP Settings" /></a></p>
  <p><strong>Probes</strong>
  <a href="https://i.stack.imgur.com/0PGHe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0PGHe.png" alt="Probes" /></a></p>