RDS READ REPLICAS GENERAL QUESTION

0

RDS databases have DNS names. The primary DB and read replicas have different DNS names.

  1. Does my code need to have access to the read replicas and if yes then in what way? 2)Once I have created my read replicas, is it automatic that my read throughput will be scaled out or does one make other configurations?
1 Resposta
1

Although read replicas are not necessary required for your code to access them, it is strongly advised that you use them to divert read traffic away from the main database. You can enhance the functionality of your program and lighten the load on your main database by doing this. You can use the read replicas' DNS names to connect to them straight from your code in order to reach read replicas. For example, the MySQL command-line client or JDBC/ODBC drivers can be used to link to the read replicas.

Your read throughput will be scaled out automatically once your read replicas have been made. To guarantee that your application can benefit from the read, there are a few things you can do.

Update your application code to use the DNS names of the read replicas.

Distribute read traffic across the read replicas to avoid overloading any single read replica.

Use a load balancer to distribute read traffic across multiple read replicas.

Use read-only transactions to ensure that read traffic goes to the read replicas and not the primary database.

AWS_Guy
respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas