OCI Virtual Network Configuration Causing Latency Issues in Microservices Communication
I'm updating my dependencies and I recently switched to I'm updating my dependencies and I'm sure I'm missing something obvious here, but I'm experiencing significant latency issues when my microservices, hosted on Oracle Cloud Infrastructure (OCI), communicate with each other over a Virtual Cloud Network (VCN)... The services are implemented with Spring Boot and are using REST for inter-service communication. I've set up the VCN with subnets that are in the same availability domain, but the latency is still around 300ms, which is much higher than expected. I've verified that the security lists associated with my subnets allow all traffic within the VCN. Here's a snippet of my VCN configuration: ```json { "cidrBlock": "10.0.0.0/16", "subnets": [ { "cidrBlock": "10.0.1.0/24", "availabilityDomain": "Uocm:PHX-AD-1", "displayName": "Subnet-1" }, { "cidrBlock": "10.0.2.0/24", "availabilityDomain": "Uocm:PHX-AD-1", "displayName": "Subnet-2" } ] } ``` I've tried increasing the size of the instances and ensuring that they are all in the same region and availability domain. I also checked the health of the network using OCI's diagnostics tools, but everything seems fine. When I perform a ping test between instances, I generally see latencies around 10-15ms, but when making HTTP requests, it's spiking significantly. I'm using the `RestTemplate` class in Spring Boot, and I have implemented connection pooling using HikariCP as follows: ```java @Bean public DataSource dataSource() { HikariConfig config = new HikariConfig(); config.setJdbcUrl("jdbc:oracle:thin:@//<db-ip>:<port>/<service-name>"); config.setUsername("<username>"); config.setPassword("<password>"); config.setMaximumPoolSize(10); return new HikariDataSource(config); } ``` I suspect the issue might be related to the way I am configuring the load balancer or possibly related to the OCI VCN routing rules. Has anyone faced similar issues or have suggestions on optimizing the microservices communication latency in OCI environments? For context: I'm using Java on macOS. I'd really appreciate any guidance on this. I'm coming from a different tech stack and learning Java. Has anyone dealt with something similar? Any ideas how to fix this?