My situation:
- Stateful Service that houses my reliable dictionary.
- Stateless WebAPI to act as an endpoint so my other web applications can communicate with my Stateful Service.
- My other web applications are hitting my stateless WebAPI over 5000 times per page-load to get data out of my reliable dictionary. I know I know... I'm the lucky guy that inherits this legacy code.
The problem:
The latency for each call is around 100 millseconds (I'm debugging locally if that makes any difference) but multiply that by 5000 and we're talking about minutes now.
Instead of passing keys to call my reliable dictionary over 5000 times...Can I just make ONE call to Service Fabric with multiple keys?
You can use Eli Arbel's extension on IReliableDictionary https://gist.github.com/aelij/987d974c811865029564f1bbeffb6b47. Something like