All About Oracle Integration Cloud Agent | OIC
Majority of Oracle Integration users are well aware of OIC Agent. In this blog, we will be covering the What, Why/Where & How parts of it to clear confusion around OIC Agent.
In this blog, we will understand the following topics:
- What is an OIC Agent?
- Why/Where do you need an OIC Agent?
- What are the correct architecture patterns to use OIC Agent? How to configure an OIC Agent for HA?
- How communication happens from OIC to Agent?
- How to install an OIC Agent? How does it work?
What is an OIC Agent?
In simple terms, an OIC agent is nothing but a package of Java libraries that you’ll keep in your Data Centers/Virtual Machines to help connect your Data Center/Virtual Machines with an OIC instance.
Why/Where do you need an OIC Agent?
All the applications/databases with which you want to communicate On-Prem or Cloud are ideally behind firewalls and aren’t reachable via Public Internet. Hence, we will have an agent installed behind the firewall on the same network as the on-premises applications, so that you can communicate easily.
NOTE: OIC Agent is for OIC to communicate with On-Prem/Database and not the other way round.
What are the right architecture patterns to use OIC Agent?
Scenario 1: Your Database/Application is running On-Prem behind a firewall
Scenario 2: Your Database/Application is running on Cloud
The next 2 scenarios can be slightly confusing, so please read it carefully/twice.
Scenario 3: Configuring OIC Agent for HA
Let us say you are trying to connect to a database/application which is On-Prem/Cloud (be it OCI/Non-OCI cloud). By this time you are well aware of how to establish a connection with On-Prem/Cloud Database/Application i.e., you’ll install the Oracle Integration agent in the network where your Database/Application is running.
What if the server on which you have installed OIC Agent is down due to any reason? Then, you’ll not be able to establish a connection with the Database/Application. This is where, HA of agent plays a crucial role.
Now, let us see how to set up OIC Agent to mitigate the single point of failure.
Before setting up an OIC Agent for HA, let us understand clearly what is Agent Group and its relation to an OIC Agent.
Agent Group is what we create in OIC Console. When we install an OIC agent we map it with an Agent Group and in the connection, we select that Agent Group.
Agent Group to Agent has a 1:2 relation i.e., at max. you can have two OIC Agents referring to a single Agent Group and this should be used only in cases of HA i.e., you will install 2 agents on two different machines i.e. both the agent’s InstallerProfile.cfg would be referring to the same AgentGroup Identifier so that if one agent is down the other agent can serve the requests.
In this architecture you may ask as to how will you decide to which agent the request has to flow or what if the request flows to agents on both the machines? The answer to this is Agent Group i.e., Agent Group decides to which Agent it has to pass the request, so that you’ll not be in a situation where the same request is sent to both the agents at anytime.
Scenario 4: Configuring OIC Agent HA for HA Application/Database
Let us consider a case where your application/database is configured for High Availability. In such cases, we need to plan our architecture in such a way that we utilize less number of Agent Groups as there is a restriction of only 5 Agent Groups creation per OIC Instance and each Agent Group is restricted to be used by only 2 Agents.
OIC Instance : Agent Group --> 1:5
Agent Group : Agents --> 1:2
Let us use the above architecture to explain this scenario better, where my application & database are configured to be HA (Highly Available) i.e., my application & database are installed on 2 different machines each. In such cases, we will configure a Load Balancer in front of them (Here, Load Balancer distributes the traffic to both the application servers based on the algorithm used while configuring Load Balancer). We need to have a Server in front of the Load Balancer on which OIC Agent is configured, so that we can limit the number of Agents/AgentGroups being used, unless until explicitly asked for in our design to use separate AgentGroups for Application & Database.
In the above architecture, I am using only One Agent Group to connect to both Application & Database on Cloud and One Agent Group to connect to both Application & Database On-Prem.
How communication happens from OIC to Agent?
In general, communication from Database/Application to OIC happens via Public Internet unless explicitly you configure it to use either a Fast Connect (if you need more Bandwidth)/VPN Tunnel between on-prem/Non-OCI Cloud and OCI which is explained well in Oracle blogs here.
How to install an OIC Agent?
Before we start with downloading Agent, we need to create an OIC Agent Group in your OIC Console
- Navigate to Integrations → Agents (on your OIC Console)
- Click on Create Agent Group to create an Agent Group
- Download the Agent (which will be a zip file to be configured On-Prem/Cloud)
- Make note of the AgentGroup Identifier as this should be entered for Agent configuration.
Copy the downloaded zip file to your On-Prem/Cloud location and unzip it which will have contents as below
Open InstallerProfile.cfg and update the configuration by providing details.
- OIC Instance URL
- Agent Group Identifier name from OIC Agent Group
- OIC Username & Password (these are optional, as you can pass them at runtime)
This completes your Agent configuration and we need to run the agent using the below command:
java -jar connectivityagent.jar
How does an OIC Agent Work?
An OIC agent keeps sending heartbeat to OIC instance that it is alive and ready to accept any request.
Let us say you have an Application/Database On-Prem/Cloud with which you wanna communicate. Then ideally it communicates through the port of adapter to which your Agent Group is attached. Let us say you have an Oracle Database On-Prem with which you want to communicate. In such cases we usually create a database adapter in OIC and attach Agent Group to that adapter. In such cases it communicates via the database port. Similarly for other adapters.
!!! Happy Reading !!!