Lately, due to escalated vehicle density in swiftly expanding cities, traffic management has become challenging. To upgrade the quality of congestion control, a finer traffic signal control and routing approach is much needed. But many such techniques rely upon additional infrastructure which might be complicated and not be effective in real-time. Henceforth, in this paper, a better traffic light optimization method is proposed which dynamically extracts live input and regulates the traffic signal timing in accordance. The system takes video feeds from cameras which are then processed through Haar Cascade Classifier to estimate the traffic density at a junction. These approximated vehicle counts from all lanes are then updated and stored in the firebase cloud. A prototype is designed using Raspberry Pi that retrieves the count from the cloud and duly optimizes the traffic by either extending or shrinking the signal duration. As the model does not depend on sensors or tools, it requires simpler installation and configuration procedures. But at the same time, it significantly aids in lessening the traffic congestion at an intersection by means of incessant traffic monitoring and control.