How do you design an Azure environment that dynamically matches your resource footprint to sudden traffic spikes while actively driving down idle infrastructure costs? Furthermore, the native autoscaling engine continuously monitors telemetry from Azure Monitor, utilizing custom rules, schedules, and even machine learning to trigger scale-out or scale-in actions. What is your preferred strategy for balancing metric-based triggers with scheduled time profiles to prevent system flapping?