Given a scenario where a web application is facing latency issues, how would you identify and address the bottlenecks?