视频1 视频21 视频41 视频61 视频文章1 视频文章21 视频文章41 视频文章61 推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37 推荐39 推荐41 推荐43 推荐45 推荐47 推荐49 关键词1 关键词101 关键词201 关键词301 关键词401 关键词501 关键词601 关键词701 关键词801 关键词901 关键词1001 关键词1101 关键词1201 关键词1301 关键词1401 关键词1501 关键词1601 关键词1701 关键词1801 关键词1901 视频扩展1 视频扩展6 视频扩展11 视频扩展16 文章1 文章201 文章401 文章601 文章801 文章1001 资讯1 资讯501 资讯1001 资讯1501 标签1 标签501 标签1001 关键词1 关键词501 关键词1001 关键词1501 专题2001
MySQL–ScalabilityonAmazonRDS:ScaleouttomultipleRD_MySQL
2020-11-09 19:19:05 责编:小采
文档
 Today, I’d like to discuss getting betterMySQL scalability on Amazon RDS.

The question of the day:“What can you do when a MySQL database needs to scale write-intensive workloads beyond the capabilities of the largest available machine on Amazon RDS?”

Let’s take a look.

In a typical EC2/RDS set-up, users connect to app servers from their mobile devices and tablets, computers, browsers, etc. Then app servers connect to an RDS instance (web/cloud services) and in some cases they might leverage some read-only replicas.

Figure 1. A typical RDS instance is a single-instance database, with read replicas. This is not very good at handling high write-based throughput.

As your application becomes more popular you can expect an increasing number of users, more transactions, and more accumulated data. User interactions can become more challenging as the application adds more sophisticated capabilities. The result of all this positive activity: your MySQL database will inevitably begin to experience scalability pressures.

What can you do?

Broadly speaking, there are four options available to improve MySQL scalability on RDS.

1. Larger RDS Instances– If you’re not already using the maximum available RDS instance, you can always scaleup– to larger hardware. Bigger CPUs, more compute power, more memory et cetera. But the largest available RDS instance is still limited. And they get expensive.

“High-Memory Quadruple Extra Large DB Instance”:

  • 68 GB of memory
  • 26 ECUs (8 virtual cores with 3.25 ECUs each)
  • -bit platform
  • High I/O Capacity
  • Provisioned IOPS Optimized: 1000Mbps
  • 2. Provisioned IOPs– You can get provisioned IOPs and higher throughput on the I/O level.

    However, there is a hard limit with a maximum instance size and maximum number ofprovisionedIOPs you can buy from Amazon and you simply cannot scale beyond these hardware specifications.

    3. Leverage Read Replicas– If your application permits, you can leverage read replicas to offload some reads from the master databases. But therearea limited number of replicas you can utilize and Amazon generally requires some modifications to your existing application.

    And read-replicas don’t help with write-intensive applications.

    4. Multiple Database Instances– Amazon offers a fourth option:

    You can implement partitioning,thereby spreading your data across multiple database Instances” (Link)

    However, Amazon does not offer any guidance or facilities to help you with this. “Multiple database instances” is not an RDS feature. And Amazon doesn’t explain how to implement this idea.

    In fact, when asked, this is the response on an Amazon forum:

    Q: Is there any documents that describe the partition DB across multiple RDS?
    I need to useDBwith more 1TB but exist a limitation during the create process, but I read in the any FAQ that you need to partition database, but I don’t find any documents that describe it.

    A:“DB partitioning/shardingis not an official feature of Amazon RDS or MySQL, but a technique to scale out database by using multiple database instances. The appropriate way to split data depends on the characteristics of the application or data set. Therefore, there is no concrete and specific guidance.”

    So now what?

    The answer is to scale out with ScaleBase.

    Amazon RDS with ScaleBase: What you get – MySQL Scalability!

    ScaleBase is specifically designed to scale out a single MySQL RDS instance into multiple MySQL instances.

    Critically, this is accomplished with no changes to your application code. Your application continues to “see” one database. ScaleBase does all the work of managing and enforcing an optimized data distribution policy to create multiple MySQL instances.

    With ScaleBase, data distribution, transactions, concurrency control, and two-phase commit are all 100% transparent and 100% ACID-compliant, so applications, services and tooling continue to interact with your distributed RDS as if itwerea single MySQL instance.

    The result: now you can cost-effectively leverage multiple MySQL RDS instance to scale out write-intensive workloads to an unlimited number of users, transactions, and data.

    Amazon RDS with ScaleBase: What you keep – Everything!

    And how does this change your Amazon environment?

    1. Keep your application, unchanged –Thereis no change yourapplication development life-cycle at all. You still use your existing development tools, frameworks and libraries. Application quality assurance and testing cycles stay the same. And, critically, you staywithan ACID-compliant MySQL environment.

    2. Keep your RDS value-added services– The value-added services that you rely on are all still available. Amazon will continue to handle database maintenance and updates for you. You can still leverage High Availability via Multi A-Z. And, if it benefitsyouraapplication throughput, you can still use read replicas.

    3. Keep your RDS administration– Finally the RDS monitoring and provisioning tools you rely on still work as they did before.

    With your one large MySQLinstance, nowsplit into multiple instances, you can actually use lessexpensive,smallersmalleravailable RDS hardware and continue to see better database performance.

    Conclusion

    Amazon RDS is a tremendous service, but it doesn’t offer solutions to scale beyond a single MySQL instance. Larger RDS instances get more expensive. And when you max-out on the available hardware, you’re stuck. Amazon recommendsscaling outyour single instance into multiple instances for transaction-intensive apps, but offers no services or guidance to help you. This is where ScaleBase comes in to save the day.

    It gives you a simple and effective way to create multiple MySQL RDS instances, while removing all the complexities typically caused by “DIY” shardingandwithno changes to your applications.

    With ScaleBase you continue to leverage the AWS/RDS ecosystem: commodity hardware and value added services likereadreplicas, multi A-Z, maintenance/updates and administration with monitoring tools and provisioning.

    SCALEBASE ON AMAZON

    If you’re curious to try ScaleBase on Amazon,it can be found here –Download NOW.

    Reference:Pinal Dave (http://blog.sqlauthority.com)

    下载本文
    显示全文
    专题