Reputation: 1228
I guess the title is pretty objective, but just to clarify:
When you create an Aurora Database Instance, it is asked to give a name for a Database Instance, a Database Cluster and a Database (where the name of the Database is optional, and no databases are created if it is not specified...). When you create another instance, you have to give the name for both again, and neither of them can be the same one as the first ones.
So, what's the difference between an Aurora Database Instance and an Aurora Database Cluster?
Also, can (and when do) you connect to each one of them?
Thanks!!
Upvotes: 57
Views: 52601
Reputation: 2579
I will try to explain the setup in a simpler way. Hope this will answer all the questions in the end.
An Amazon Aurora DB cluster consists of one or more "DB instances" and a "cluster volume" that manages the data for those DB instances. Each Aurora DB cluster will have one primary DB instance for sure.
Despite from RDS instances, the major difference is that RDS Aurora instances don’t contain any data. They simply facilitate the reading and writing to the Aurora cluster [ Refer the diagram here ]. It’s the Aurora cluster that contains the data. That is why Aurora snapshots are not considered "DB snapshots". Instead, they are considered "cluster snapshots".
There are two endpoints associated with any Aurora cluster;
A cluster endpoint (or writer endpoint) for an Aurora DB cluster connects to the current primary DB instance for that DB cluster. A reader endpoint for an Aurora DB cluster provides load-balancing support for read-only connections to the DB cluster.
If the cluster only contains a primary instance and no Aurora Replicas (because we can create like that), the reader endpoint connects to the primary instance. In that case, you can perform write operations through the endpoint.
Links:
Upvotes: 15
Reputation: 2267
An Aurora cluster is simply a group of instances. By default, Aurora will create two instances in a cluster - one for reads and the other for writes. But you can change that configuration to be whatever you need.
For the names:
To connect, just point your application at the cluster endpoint. RDS will route traffic and handle failovers for you.
Upvotes: 58