I have to get the maximum throughput performance in my WCF service. In one of my tests the service below got only 50k data items per minute using NetTcpBinding. Would a disconnected binding like NetMsmqBinding improve this performance?
Service and client uses WCF and run in the same machine.
[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.