Replica set data latency

Hi All,
I am facing an issue of data replication. Means, We are using replica set (1 Primary, 1 Secondary and 1 Arbiter) and through Java Application we are inserting documents (100 documents in a minute). For 1 day I can see those documents in data base after 1 day there was delay to insert the document. At java application says inserted the documents but we can’t see those documents in database when we make a query. It display after 30 minute. So it is a 30 minute delay.
But, If I use standalone mongo db Node (means without replication) then it works fine without any delay.
Primary and secondary servers are different and this is the configuration of secondary.

systemLog:
destination: file
path: F:\MongoDB\logs\rs-node-2.log
storage:
wiredTiger:
engineConfig:
cacheSizeGB: 18
dbPath: F:\MongoDB\data\force-rs\rs-node-2
net:
bindIp: 0.0.0.0
port: 27018
replication:
replSetName: force-rs
enableMajorityReadConcern: false
security:
authorization: enabled

Kindly suggestion what I can do.

There is not enough information for us to help.

Different configuration? Different machine?

Setting the port to 27018 makes me think you they are on the same hardware.

What are the resources of the machine(s)? RAM, cpu, disks, …

How are they connected?

Hello Steeve
Now, we are getting this delay with single node mongo DB after 2 days. We are using virtual SDD disk.
This is the configuration of Single Node

systemLog:
destination: file
path: E:\MongoDB\logs\rs-node-1.log
storage:
dbPath: E:\MongoDB\data\force-rs\rs-node-1
net:
bindIp: 0.0.0.0
port: 27017

We are using Mongo Java Driver 3.11.2 and Mongo DB 4.0.

Here is the screen shot of CPU

image

Here is the disk activity

image

I am not sure what you mean by that.

Is your machine real or virtual?

If I understand the statement above, it means that you have the same delay in a single node configuration as with the PSA configuration.

What is the average size of your document?

Any indexes?