The DDOS can not be prevented, only passive defense
Defense there are two ways, the first is on the hardware defense, the general cost is relatively high, there are some special high-defense room
The second is to use the CDN, but pay attention to do not use the domestic set of domestic traffic charges, it is easy to accidentally turn the house into someone else. You can use the foreign cloudflare this is free
.