Best AWS autoscaling and load balancing strategy for websocket applications

We are building a scalable cloud websocket service running at Amazon. I'm looking for the best auto-scaling and load balancing strategy to use with our websocket API examples.

Currently our autoscaling policy is simply based on CPU usage, for example "when the average cpu is> 80% - starts more instances, when the CPU and 30% - cool", but I feel that this is not enough. Since website connections are long-lived, adding more capacity obviously won't help current instances that are already overwhelmed. Ideally, I would like to have some metric such as "average TCP connections" in addition to CPU usage for autoscaling, and the ability to migrate connections from overloaded instances to new ones. By "connection transfers" I do not mean preserving any state,but simply discarding some of the overloaded instances and allowing clients to install new ones into new instances, distributing connections evenly across all nodes.

Can anyone share experiences or suggest a good read on best practices for running scalable websocket applications on AWS?

+3


source to share


2 answers


As far as hooking up a shared connection goes, I suggest you read the page 9 recommendation docs . Hope it helps.



-1


source


It is not easy for anyone to answer without collecting much more information. Basically, you are asking the basics of Design Basics for a scale in the cloud.

The answer to your question is to collect more data.

I know this is probably annoying you that this is not just an answer, but I promise you this is the best answer you are going to get here. the effectiveness of your solution will be determined by your ability to collect more data. But hey! the best in the industry, all the EXACT data is there, if you are not in a hurry, there will be no guesswork.



Go back and collect:

  • Information about what workloads are in use, just batch as processing? or many GETS or general data transfer? read / write?
  • What is user behavior?
  • What a typical user looks like in terms of data, send us an image.
  • What are the most commonly used use cases inside your application?
  • Depending on your webservice level, collect all httpd logs
  • Relationship of this with cloudwatch / aws magazine
    • combine all infrastructure logs, applications, systems, event logs
    • Look for patterns, pattern recognition is what we do best, identify enough patterns and you design the best system.
-1


source







All Articles