It sounds wrong to try to keep the state across two ec2 instances. If you find yourself in that situation, try pushing your state outside the ec2 instance a bit harder. (dynamodb, s3 etc...)
You will get a lot of benefit out of it, but may lose in performance, which is fine in 99% of the cases.
You will get a lot of benefit out of it, but may lose in performance, which is fine in 99% of the cases.