AWS RDS Writer Endpoint vs Reader Endpoint

Hao Chang picture Hao Chang · Nov 12, 2016 · Viewed 12.9k times · Source

I created an Amazon Aurora instance in my VPC. When the instance was created, it came with 2 endpoints, a writer and a reader endpoint.

The instance is using a security policy with an ingress rule (Type: All Traffic, Protocol: All, Port: All, Source: 0.0.0.0/0).

I tried both MySQL Workbench and MySQL monitor command interface to connect to the endpoints.

The connection to the Reader endpoint worked but that to the Writer endpoint didn't. The reader endpoint was readonly, so I was unable to build my DB using it.

Any idea?

Answer

maziar picture maziar · Dec 28, 2016

An aurora cluster instance might be either a writer or a reader. Aurora clusters allow one writer and up to 15 readers. The instance role might change failover happens.

The writer DNS endpoint always resolves to the writer instance, Cluster writer endpoint

The reader endpoint DNS randomly resolves to one of the reader instances with TTL=1.

(Note: It might point to the writer instance only if they are one healthy instance is available in the cluster fleet) Cluster reader endpoint