I need to get the best performance in my WCF service. In one of my tests, the service below received only 50 thousand data per minute using NetTcpBinding. Will a disconnected binding, such as NetMsmqBinding, improve this performance?
The service and client use WCF and run on the same computer.
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,
ConcurrencyMode = ConcurrencyMode.Multiple)]
public class Storage : IStorage
{
protected List<int> _data = new List<int>();
public void Insert(int[] data)
{
lock (_data)
{
_data.AddRange(data);
}
}
public int[] Get()
{
lock (_data)
{
return _data.ToArray();
}
}
}
The code above is a simplified version of the actual code.
source
share