Software-Defined Networking (SDN) is a promising technology for 5G thanks to the separation of data plane and control plane. However, especially in ultra-dense scenarios, as a result of the centrality of the SDN controller, the response time increases with the ultra high spiky demands of the incoming heterogeneous flows. This sudden increase causes an uncontrollable rise in end-to-end (e2e) latency and drop rate in the controller. Moreover, this also leads to an unbalanced QoS provisioning in this heterogeneous flow management. To tackle these challenges, in this paper, we propose a Flow-Aware QoS Engine by considering both huge flow demands and QoS requirements of different 5G flows (URLLC, eMBB, mMTC). This novel QoS-based engine contains two steps in a single controller: The Admission Management and The Priority Management. In admission management, we modify the generic Loss Ratio-Based Random Early Detection Algorithm (LRED) by implementing an add-on containing the arrival rate of different flow types. In the proposed priority management, we design a tree-based priority management scheme where we dynamically assign priorities to each flow type regarding fairness. According to our thorough evaluation results, we get up to 53% lower response times, up to 58% lower e2e latencies, and up to 36% lower drop rates for three different flows in ultra-dense SDN scenarios.