设计高性能可扩展的API服务

Directus本身是NodeJS实现的API服务器。 其能支持多大的TPS取决于数据库系统,API查询设计等多个因素。本文提供一些架构上的考虑,目的是使得Directus应用能随着业务的增长,通过增加硬件等方式,同步提高系统处理能力,在性能上具有好的扩展性。 1. 如何规划可扩展的Directus应用 Directus 对于高负载情况的处理有以下两个关注点: 横向扩展应用服务器(directus实例多部署几个) 数据库服务器采用高性能方案,例如Amazon Aurora或者CockroachDB Rijk van Zanten: That being said, I do highly recommend horizontally scaling your Directus instance if you’re planning on running it at scale. Make sure you use Redis for caches / rate limiter, and S3 or another shared file storage for the file storage. At that point, the bottleneck will become the amount of allowed connections and the overall server performance of the database. That being said, there’s a lot of database services nowadays that scale virtually endless, like Amazon Aurora or CockroachDB. ...

2022年3月2日 · 1 分钟