I am using ESDB v 20.10.2.0. This is deployed in a docker container in Kubernetes cluster; data and logs are stored in the same installation directory. We use Java client to read the stream from the esdb server, pfb the code snippet.
ReadStreamOptions readStreamOptions = ReadStreamOptions.get().fromStart().notResolveLinkTos();
DomainEventDeserializer deSerializer = new DomainEventDeserializer();
try {
List<ResolvedEvent> resolvedEvents =
client.readStream(addPrefix(aggregateId), readStreamOptions).get().getEvents();
return resolvedEvents
.stream()
.map(
resolvedEvent -> {
byte[] eventData = resolvedEvent.getOriginalEvent().getEventData();
return deSerializer.deserialize(null, eventData);
})
.filter(data -> data != null)
.collect(Collectors.toCollection(LinkedHashSet::new));
The reading events from esdb is taking 3x the time compared to reading something from an sql db.
I would like to know what could be the optimal configuration for this and how to improve the read performance.
.\EventStore.ClusterNode.exe --db .\db --log .\logs --insecure --run-projections All --enable-atom-pub-over-http --enable-histograms --reader-threads-count 8 --worker-threads 10 --log-http-requests
this is the command used to run esdb in my local system, same options are enabled in kubernetes cluster also.