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개 답변
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
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠