0

I'm not a server guy, but for my website I have started learning about aws because I have migrated my website from godaddy to aws.

I have searched for my problem in many tutorials, documentation, youtube and stackoverflow as well but could not find it. I'm struggling with this for 1 week.

I have installed wordpress on my aws using bitnami. My website was running with 1 instance i.e free created using bitnami and I have added more than 22k records on my wordpress site so My site started loading very slow because of heavy data in the database which was causing 100% cpu usages so often then I did the following

  1. added load balancer and attached existing instance with elb
  2. created image of existing instance (bitnami wordpress instance)
  3. created the launch configuration under auto scaling
  4. created auto scaling group
  5. now 1 more instance started showing
  6. I have added this new instance to load balancer as well
  7. now website is loading very fast because the load is divided into 2 servers

Now the prob is

  1. both servers have the different database I need to add more data, how I can add data? do I need to add data to both server database individually?

  2. As both servers are different so both have different files and I need to make lot of changes in the files because website is under development. do I need to make changes in both server files always?

is there a way that both servers serve the same database and same files so I don't need to make changes in 2 different places everytime

I will be really thankful if anyone can get me out of here. I believe this is a common problem many people should have faced but I did not find anything like this anywhere which could help me.

Thanks,

user3764679
  • 77
  • 1
  • 6

2 Answers2

1

You need to take your database out of the Auto Scaling Group and put other materials in a shared storage. You could use Amazon RDS as your database and Amazon S3 as a shared storage. Both of these services are scalable so you don't need to worry about scaling in/out in the future. Also refer to this tutorial for deploying a high availability WordPress website.

Mahdi
  • 3,199
  • 2
  • 25
  • 35
0

I got it resolved by moving to RDS and it works like a charm. now my files and database are hosting in different servers and website loading speed also improved.

I have tested website with some load testing tools and it can handle some huge number of traffic now.

Note: I have shut down the old instance now website is working on 1 instance only and its working beter than before.

Thanks @mahdi your answer helped me.

user3764679
  • 77
  • 1
  • 6