Database in OCI is used to store, manage, and retrieve data whenever needed. These databases need to be Highly available & Fault-tolerant. For this, we use various methods like implementing RAC Databases, Data Guard, etc. Database Sharding is one of them. With the new update of Oracle, we can deploy Database Sharding on Oracle Kubernetes
This blog post covers all you should know about Database Sharding and how we can implement it using OKE (Oracle Kubernetes Engine).
To know in detail about:
- Docker Architecture
- Difference between Docker & VM
- Kubernetes Architecture
- Difference between Kubernetes & Virtual Machine
Overview Of Database Sharding
Database Sharding is the concept of splitting the database into multiple databases. Splitting the database means we are splitting the data inside a database and create various new databases. The newly formed databases are called shards. It makes the database more scalable, Highly available & fault-tolerant.
Note: Shards can be formed on Cloud as well as on-premise.
Also read: How to install docker on Windows, Ubuntu and MAC
Benefits of Database Sharding
- Linear Scalability: Scale capacity and performance by increasing the number of shards.
- Fault-Tolerant: It is a shared-nothing infrastructure that means that each shard is isolated. If there is a failure or any slow-down of one shard will not affect the other.
- Distributed Data: It allows you to spread data across regions and make particular data available to consumers. For eg: data of US consumers is stored in the US region and data of Canada consumers are stored in the Canada region.
- Rolling Upgrades: Changes made to one shard will not affect the processing of other shards.
Also check: Everything you need to know about CKA Certification
Database Sharding On Oracle Kubernetes (OKE)
- Oracle Kubernetes (OKE) is a highly available and manageable service in Oracle Cloud Infrastructure (OCI). It is used to deploy containerized applications in OCI. Kubernetes groups the application containers into logical units called pods.
- Containers are a software package into an invisible box with everything that the application needs to run. That includes the operating system, application code, runtime, system tools, system libraries, and etc. Docker containers are built off Docker images.
Oracle Sharded Databases can be deployed on OKE (Oracle Kubernetes Engine). So that we can deploy containers in different regions and provide HA, Fault Tolerance, and scalability to the databases (shards) in containers.
To deploy Oracle Database Sharding on OKE, we use Ansible Modules that will create compute resources, configure the network, create block storage volumes. It does so by using a YAML file passed to ansible playbooks.
Check out: to know more about Docker Container Lifecycle Management
1) Deploy An Ansible machine.
Ansible Modules are used to automate the provisioning and configuring of various cloud resources in OCI.
- Installing and configuring pip (Python Manager)
- Install Ansible Engine and OCI specific Ansible modules
- Setup the OCI configuration file for Ansible.
To know more about Ansible Machine and how to configure, click here.
2) Configure The OKE Cluster In OCI.
Oracle Kubernetes Engine (OKE) is used to deploy the containerized applications on Oracle Cloud.
- Read our blog to know more about OKE cluster in OCI.
- To know the steps to configure the OKE cluster, click here.
3) Create GSM And Oracle Database Images (Optional)
This step is optional and you need to execute this when you do not have access to Oracle GSM software and database image.
4) Oracle Database Sharding Deployment Using Helm/Charts.
Helm is a packaging tool used to install applications and services on Oracle Kubernetes (OKE). It uses a packaging format called charts. Charts are YAML templates that describe a particular set of Kubernetes resources.
To know how to perform sharding using Helm/Charts, click here
Reference/Related Post
- Amazon EKS (Kubernetes on AWS)
- [Video] Containers (Docker) & Kubernetes In Azure For Beginners
- Kubernetes Architecture & Components Overview For Beginners
- Docker Image And Layer Overview For Beginners
- Docker Networking & Different Types Of Networking For Beginners
- Oracle Kubernetes (OKE)
Join FREE Masterclass
Discover the Power of Kubernetes, Docker & DevOps – Join Our Free Masterclass. Unlock the secrets of Kubernetes, Docker, and DevOps in our exclusive, no-cost masterclass. Take the first step towards building highly sought-after skills and securing lucrative job opportunities. Click on the below image to Register Our FREE Masterclass Now!
Leave a Reply