100.000 Grains per minute #7088
|
Hello team, Orleans newbie here! We have an application that accepts about 100.000 requests per minute. The need is to keep the request's state for about 30 seconds, so we have:
Assuming resources are unlimited, is Orleans a good fit for our case? |
Replies: 1 comment 3 replies
|
Assuming resources are unlimited, a simple two-tier api with a database or redis can do this for you, if you can throw enough money at it. So are resources really unlimited, since you're looking at Orleans? Activating a grain instance has a non-trivial cost on the system. After that, it becomes very fast to send messages to the grain instance, but the initial activation cost is not something to be overlooked, as the grain directory protocol has to manage and ensure the uniqueness of grain instances across the cluster. A low-resource platform can get overwhelmed if it gets bombarded with more activation requests than it can handle. The quantity of grain instances itself is not much of an issue but the activation rate can be. Orleans can fulfill the distributed cache role just fine, however it's important to evaluate the system constrains in order to offer an appropriate design. For example, you could design the system so it shards grain instances by the request id itself, as you ask, or you could shard by the hash of the request id, meaning you could have e.g. a fixed 100 long-lived grain instances handling the incoming 100.000 requests per second. This would negate the pressure on the grain directory and keep the system snappy, while still allowing it to scale as more nodes are added. This is a similar sharding approach as you'd use on a redis cluster. This is just one alternative approach, there will likely be more ways to go about it with more information on the domain. |
Assuming resources are unlimited, a simple two-tier api with a database or redis can do this for you, if you can throw enough money at it. So are resources really unlimited, since you're looking at Orleans?
Activating a grain instance has a non-trivial cost on the system. After that, it becomes very fast to send messages to the grain instance, but the initial activation cost is not something to be overlooked, as the grain directory protocol has to manage and ensure the uniqueness of grain instances across the cluster. A low-resource platform can get overwhelmed if it gets bombarded with more activation requests than it can handle. The quantity of grain instances itself is not much of an i…