简体   繁体   English

AWS RDS 优化内存与突发实例

[英]AWS RDS Optimized Memory vs Burstable Instance

I am currently using Memory optimized DB class in AWS (8 CPUs) because some push notifications in our app cause the CPU utilization to skyrocket, but 99% of the time CPU utilization is at about 10% so 8 CPUs aren't really needed most of the time.我目前在 AWS(8 个 CPU)中使用内存优化 DB 类,因为我们应用程序中的一些推送通知会导致 CPU 利用率飙升,但 99% 的时间 CPU 利用率约为 10%,因此实际上并不需要 8 个 CPU的时间。

Would I be able to deploy less CPUs on a Burstable Instance and have CPUs adjusted when there are those heavy traffic push notifications?我是否能够在 Burstable 实例上部署更少的 CPU 并在有大量流量推送通知时调整 CPU?

How do Burstable Instances work?可突发实例如何工作?

I believe most RDBMS, particularly MySQL, can only be scaled "vertically", in the sense that you can't dynamically add/remove CPU resources to handle bursts of reads/writes.我相信大多数 RDBMS,尤其是 MySQL,只能“垂直”扩展,因为您无法动态添加/删除 CPU 资源来处理突发的读/写。

Perhaps you can create a "notification/fanout" service which is more easily dynamically scaled up and down, using perhaps DynamoDB or AWS SNS.也许您可以使用 DynamoDB 或 AWS SNS 创建更容易动态扩展和缩减的“通知/扇出”服务。 This way your primary database can avoid all of that traffic and in turn you can use a much less expensive EC2 instance for your RDS.这样,您的主数据库可以避免所有这些流量,反过来您可以为您的 RDS 使用更便宜的 EC2 实例。

I wouldn't choose a burstable instance for any production traffic.我不会为任何生产流量选择可突发实例。

The burstable instance accumulates a number of "performance credits" per hour.可突增实例每小时累积一些“性能积分”。 These credits can be consumed when traffic increases and you needs a significant amount of resources.当流量增加并且您需要大量资源时,可以消耗这些积分。 When the credits are spent, the instance still runs, but has only "baseline performance" which is, frankly, insufficient to handle production traffic.当积分用完时,实例仍然运行,但只有“基线性能”,坦率地说,这不足以处理生产流量。

I've seen many users try to economize by using the T family of instance types.我见过许多用户尝试通过使用 T 系列实例类型来节省成本。 They are usually quite disappointed, because they underestimate their need for resources.他们通常很失望,因为他们低估了自己对资源的需求。 They end up consuming their burst credits too quickly, and then operate at the baseline performance level too often.他们最终会过快地消耗他们的突发积分,然后过于频繁地以基准性能水平运行。

I'd use a burstable instance only for CI testing servers, or development.我只会将可突发实例用于 CI 测试服务器或开发。 These instances typically run idle most of the time, and accumulate a good level of performance credits.这些实例通常大部分时间都处于空闲状态,并积累了良好的性能积分。 They use these credits for brief periods, and then return to an idle level of activity.他们在短时间内使用这些积分,然后恢复到空闲的活动水平。

You can also look into Aurora Serverless.您还可以查看 Aurora Serverless。 This is supposed to auto-scale more replica instances in response to traffic increases, which should give you more CPU capacity.这应该会自动扩展更多副本实例以响应流量增加,从而为您提供更多 CPU 容量。 You only pay for the instances you use.您只需为使用的实例付费。 That's the theory, but I can't speak from experience because I haven't used or tested Aurora Serverless.这就是理论,但我不能从经验中说出来,因为我没有使用或测试过 Aurora Serverless。 How well it works and how economical it is for you depends on your application's workload.它的效果如何以及对您来说有多经济取决于您的应用程序的工作负载。 All I can suggest is to give it a try.我只能建议尝试一下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM