Below are the answers for your questions:
1. What is difference between wcf and webapi?
A. WebAPi is HTTP based while the WCF is supported by many technologies like asmx, web service etc.
2. When to use wcf and when to use webapi?
A. When we need to use the maximum HTTP features, we can go with Web API and we need to work with multiple protocols, we have to go with the WCF.
3. Which one is best?
A. Its all depends on the requirements. Web API is HTTP based so light weight but lacking in security, WCF is heavy but support many things.
4. Which one controls traffic best?
A. When we need to work with the Web Technologies, Mobile support etc, we have to go with the Web API.
5. Which one is best for security reason?
A. WCF is better for Security concerns as it comes with the Transport level as well as message level security.
Hope it will be helpful to you.
Pawan Awasthi(DNS MVM)
+91 8123489140 (whatsApp), +60 14365 1476(Malaysia)