Scaling WordPress using Google App Engine and Google Cloud SQL - wordpress

We need to use WordPress for a site that is going to have high traffic. We expect an initial load of 500K page views a month and will increase to about 8M page views a month. Usage will be mainly during working time, which is around 20 days a month during 8 hours.
We are thinking on using Google App Engine with Google Cloud SQL. We were wondering how well it scales for that kind of load. Theory says Google App Engine should scale automatically, but not sure how good is Google Cloud SQL when scaling. This will be a mostly read database, which a few writes.
So the questions are:
Does anyone has experience deploying WordPress on Google App Engine + Google Cloud SQL with a high load?
Do you know if there are problem installing plugins for WordPress on Google App Engine? Do they need any especial modification?

To save you some time, look to other solutions.
I'm working on this exact task now, but I'm about to give up due to Cloud SQL's very poor performance. It might work fine for websites like Orane's, but for larger more complex websites the high latency and slow response time from Cloud SQL means for us 3 second load times instead of 0.7s that we have on our VPS. I have tested by connecting to both IP and Socket, SSL and without, and it's just not usable as-is. If you test with Amazon RDS, the difference in speed is shocking.
The only other solution we've been able to come up with is to set up an API server that continously caches data to memcache and only serve static pages on App Engine with most dynamic content loading through AJAX. Scary!
Keep trying, but you'd be better off looking into RackSpace Cloud DB or Amazon RDS.

There are no problems at all and it doesn't need any modifications. Everything works perfectly and from previous projects I've done on appengine, I know it scales extremely well. I've just set up my new wordpress blog on appengine here and everything works the same but loads a lot faster. Its a little tricky to get setup however..I'm working on a tutorial for that.

Related

How can I web scrape google cache in large volumes?

I'm trying to download a few million web pages that google has already indexed. I've used proxies with mixed success directly but for the bandwidth I'm considering it's relatively cost prohibitive.
Is there any way to get access to google's cache of websites with datacenter ip's? - I've not gotten it to work reliably.
I've tried using HTTRACK, outwit and writing a basic script on google cloud.
I always run into limitations with proxy services.
In a perfect world I could just batch download google cache pages.

How to make changes in wordpress data and files from single place when I have 2 aws instance with auto scalling

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
added load balancer and attached existing instance with elb
created image of existing instance (bitnami wordpress instance)
created the launch configuration under auto scaling
created auto scaling group
now 1 more instance started showing
I have added this new instance to load balancer as well
now website is loading very fast because the load is divided into 2 servers
Now the prob is
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?
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,
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.
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.

Wordpress on Openshift, very slow to respond

I've just moved my Wordpress website on OpenShift PAAS ecosystem, on a scalable PHP cartridge. But I immediately noticed the website is really slow to respond - around 3000/4000 milliseconds. BUT, when it starts to respond, the page loading/rendering is absolutely fast.
here's the url: http://gabrielebaldassarre.com
just to give you a comparison, this static website is hosted on the same AWS Region: http://extras.gabrielebaldassarre.com/tos5-4
For that reason, I pointed this bottleneck to the nameservers I use (from Cloudflare, because of naked CNAME needs), but using a online tester, they seems ok.
I wouldn't say that my Wordpress is a vanilla config, but it's not a mammoth, after all. And loading time after response starting is ok.
I'm wondering if there is something wrong with HAProxy, or my OpenShift configuration, but I don't know how to check or what to do about.
any idea?
Openshift suspends and serializes apps without much activity after a given period, and the first time they 'wake' they deserialize and this takes time.
Since your a free user, I'm assuming that your application is deployed on small gears. Depending on the size of your application, that may not be enough. Try signing up for the bronze plan and see if your application performance improves on a medium or large gear.

ASP.NET application performance issue on Windows Azure

We have an application deployed on Windows Azure as a Web Role and we are using Pingdom for testing page load times: http://tools.pingdom.com/fpt/
The url for the application on Windows Azure is: http://www.doctorspring.com .
The load time of the app is usually around 7s.
The database is an SQL Azure database and the role and the database are in the same zone.
Sample pingdom result: http://tools.pingdom.com/fpt/#!/CllGggrMz/http://www.doctorspring.com/
Sample pingdom result(with gzip):http://tools.pingdom.com/fpt/#!/f2TUbR6OX/www.doctorspring.com
Suspecting that Azure could be the problem, we tried a free hosting from Somee as:
http://www.doctorspring.somee.com
The load time of the app on Somee is around 3.5s.
Sample pingdom result: http://tools.pingdom.com/fpt/#!/o3gZOjTwH/http://www.doctorspring.somee.com/
That is a huge performance issue for us.
Can you please help us understand the problem with Azure or suggest a method, as to how can we overcome it?
Thanks,
Manish
In both cases, loading the homepage is unacceptably slow - 3.5 seconds to generate a page is around 10 times slower than you need to be when there's no load on the site. I'd expect the site to crumble under even moderate load with this kind of performance.
Without knowing how the site is constructed, it's hard to explain the reason one environment is faster than the other - but my guess is that whatever is generating the page (some kind of CMS?) is the cause. Azure is known to be a touch slow when doing database queries - though normally this only manifests itself under extreme conditions.
I'd recommend tuning the CMS - especially with caching. We found that Azure is normally pretty fast, but when doing database lookups (e.g. retrieving content for the CMS), it can be variable; if your CMS is doing a LOT of database queries to get the homepage content, it's going to be slow.
It's also worth running Yslow - there's some low-hanging fruit on getting performance up.
What services are you running in Azure? Web-role, VM, Website? Are you connecting to an Azure Database instance from the homepage (if so how many distinct calls are you making)?. I'm getting around a 7.5 second load time from London, but to be honest even 3 seconds is too slow for the homepage. It's hard to know what's causing the prolonged page-load but if you are connecting to a DB instance there's a great deal you can do e.g.
Render the page and make some asynchronous calls to spool in additional data.
Make sure your Azure services are running close together
Consider caching database content to a blob. E.g. for the data in "Medical Questions Answered in Last 24 Hours" if you are pulling this from a DB on every load you could considerably speed up access by routinely caching this to a html file stored in a blob container and inject it into the page.
If you must make DB calls from the homepage try to make as few round trips as possible by batching up your queries into a stored procedure.
I've made a lot of assumptions here, but there are certainly things you could do to drastically improve performance on this page.

What web hosting setup should I use for high traffic website?

I am fairly new to dealing with high traffic websites and I'm looking for a setup that will be able to scale well into the future.
My site currently uses one main script to pull data and store it into a database. The rest of the website is mostly presentation of this data from the database.
I have been looking at the possibility of using Amazon Web Services (EC2) or Google Compute Engine for running the main script. Then transferring that data to a more typical web hosting service. One thing I am not sure that I need to worry about is load balancing, I've seen that using NGINX for the load balancing can help improve the performance.
My goal is to have the site up 99.99% of the time and execute the script as fast as possible. It would be optimally nice to have a great support in case something goes wrong too.
Any ideas, comments, or suggestions are welcome. I'm am trying to learn how to handle this as I have a couple other websites that are currently growing and may need such a setup in the near future.
Thanks!
Google Compute Engine is still in its very early stages. For that reason alone, I would recommend using EC2. With EC2, you have all of the features you need. The ELB can seamlessly load balance between any amount of servers, which would help with the 99.99% uptime.
Using CloudFormation, you can define templates for scaling to run that script in a clustered environment.
Hope this helps.
Just find yourself a good host with a decent SLA, running a relational database within the cloud is asking for problems when you do get high database loads.
Don't be fooled, the cloud is a really nice solution for some problem.. but NOT ALL!
Same goes for NoSQL, and the combination of cloud and NoSQL.
Do your own research and don't be hoaxed by the marketing machines and the people not doing their homework.
Loadbalancing is nice but big change your database is the first bottleneck you run into.
Don't optimize thing before you need to!
If you are asking me, find yourself a decent dedicated (non-virtual) server with a decent SLA and backup plan.
Calculate howmuch 99.9% uptime actually is and realize that there is no problem in reaching that aslong as you have a decent SLA and proper backups.
You can always go from iron to the cloud,.. the other way around is a different story.

Resources