Record and replay elasticsearch communication