Q: Reading all the key value pairs from Ignite cache taking long time on slow network I'm reading all the rows from already created Ignite cache having 1M key value pairs.  When I read it from  the same network on which ignite cluster is running, it is taking around 20 second. However, when I read it from a machine, outside the network on which ignite cluster is running, it is taking 10 minutes. The size of whole cache is around 100 MB.  I tried testing the bandwidth between the ignite cluster network and outside network by transferring file of size 100MB. It took only 5 seconds. I am wondering why Ignite is taking whopping 600 seconds to transfer the all key-value pairs from the cache?   
//cache configuration
CacheConfiguration<BenchmarkCacheStoreKey, OptionalDouble> cfg = new CacheConfiguration<BenchmarkCacheStoreKey, OptionalDouble>();
cfg.setName(cacheName);
cfg.setCacheMode(CacheMode.PARTITIONED);
//1 backup of each cache
cfg.setBackups(1);
cfg.setStatisticsEnabled(true);
cfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
cfg.setGroupName(CACHE_GROUP_NAME);
cfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
//do not blockk read/write for cache rebalancing
cfg.setRebalanceMode(CacheRebalanceMode.ASYNC);

Logic to read from cache below:
Map<K, V> readMap = new HashMap<>();
IgniteCache cache = ignite.cache(cacheName)
cache.forEach(action ->readMap.put(action.getKey(), action.getValue()));


A: Try to split you file on 1M parts and transfer it again by parts. I think this time you would have result similar to 10 minutes.

cache.forEach(action ->readMap.put(action.getKey(),
  action.getValue()));

forEach does scan query, by default scan query has page size == 1024, you can try to increase it, it will increase batching size, you can do it like this:
cache.query(new ScanQuery<>().setPageSize(10_240));

It's a cluster solution, all defaults are configured to work in the same network, so if you have bad network and run client in different cluster than server, then you might need to tweak it.
However, instead of moving data to client, it's better to send compute task to server and return some small result to client if this possible.
