I have an App Service P1V2 plan with custom autoscale rule configured to scale out to 2 instances when avg CPU >= 40% and to scale in to 1 instance when avg CPU < 40%. The scale out rule works fine when the workload gets higher in the morning around 6:30 AM , but when the avg %CPU drops below 40% it does not scale in at the expected point. Sometimes it waited for a few hours before scaling in.
Yesterday was a bit odd, it waited the whole day before scaling in at around 7:00 PM. I checked the run history and found "Flapping" at each hour for the whole day.

This is the avg CPU usage at the same time period. (5 mins granularity) You can see that avg CPU is at 25% at around 9:00 AM. I expect it to scale in at this point.

This is the scale in rule I currently have. Is there anything I should adjust? And what is Flapping? Does it have anything to do with the App Service plan not getting scaled in? Thanks.
