SD-WANs are an innovative software-defined network (SDN) technology used to reinvent networks, services, and applications in wide area network (WANs). The development of SD-WANs ranges from network optimization in the past to service provision platforms at present and distributed computing systems in the future. The existing surveys on SD-WANs are fragmented, covering specific problems only, and are not comprehensive with detailed research directions. This paper seeks to provide a systematic survey on SD-WANs by introducing major research directions and stating specific problems. Therefore, four major research directions related to traffic engineering, network optimization and systems, service orchestration, and the security issues of SD-WANs are sequentially introduced, along with detailed statements relating to specific problems and the classification of state-of-the-art research. Finally, the trends and challenges regarding SD-WANs are summarized and our future work is described.