In the era of the Internet of Everything, the burst of traffic will bring many problems. Traffic shaping, as a common means to limit burst traffic rate, achieves ''peak and valley reduction'' to smooth the output rate, avoid network congestion, guarantee the quality of service (QoS) and improve the overall network transmission efficiency. This paper first explains the basic concept of traffic shaping, the related algorithms in traffic shaping, and compares the differences between traffic shaping and traffic policing. It then describes the research on traffic shaping in software-defined networks and the results from the combination of the two. This is followed by an introduction to relatively new technology for industry, timesensitive networks, and an exploration of the functions of various types of traffic shapers in time-sensitive networks. This is followed by a description of case studies of traffic shaping in IoT scenarios and an overview of these traffic shaping schemes, summarizing the usefulness of the shaping schemes. Finally, the future of traffic shaping is explored.