Data centers have emerged as infrastructures for deploying various applications and services. To improve the security and performance, middleboxes are vastly deployed inside data centers to perform a large range of functionalities. Each of such middleboxes is equipped with diverse resources. Compared with traditional switches, middleboxes analyze the content of packets. This leads to the long processing time for flows passing through a middlebox. Additionally, executing different functionalities incurs diverse consumption on resources. Consequently, data flows undergoing different function components need different processing time on diverse resources. How to complete the transmission of such flows before their deadlines when passing through a middlebox comes out to be an essential issue, which lacks effective solutions. In this paper, we propose multi-resource & deadline-driven flow scheduling (MDFS) to satisfy the deadline requirements of flows in multi-resource environments. Besides guaranteeing the deadline, MDFS treats flows fairly and provides reliable service for them. To the best of our knowledge, this is the first paper trying to solve the deadline-driven flow scheduling problem in a multi-resource environment. With respect to the performance evaluation, up to
$90$ percent flows meet their deadlines in normal conditions by using MDFS, which greatly outperforms the performance of other scheduling schemes.