Friday, March 24, 2017

[google-cloud-sql-discuss] Re: This is how I connect my Google instance VM to Cloud SQL/ And setup my Wordpress

One step better than connecting via public IP is to connect to the internal private IP address, as you'll have a faster network path and thus reduced latency and higher bandwidth between your app and your database. Using the internal DNS name is preferable to the IP address which can potentially change.

However, you're still limited to a single application instance and a single database instance. If your user traffic increases past the point that a single instance can handle, you'll be in trouble. This is where App Engine is useful, as it can scale out multiple instances of your application on demand to respond to changes in traffic.

There are many solutions to the problem of scaling though, and App Engine is just one of them. It can also be done on Compute Engine using load balancing, managed instance groups, and autoscaling. Yet another solution is Google Container Engine, which uses Docker containers with Compute Engine resources to scale out.

On Friday, March 24, 2017 at 11:23:47 AM UTC-4, Moh'd Irshaid wrote:
Hi,
I've decided to move from normal hosting companies to Google cloud and run my own server; most of my websites are WordPress. but I want to make sure that what I've done is right .. its working until now! but not sure if it is the best thing to do;

I've created my VM instance;
I've installed vesta cpanel.

But for databases I dont want to host it in the same instance! so under the same project I've created SQL instance,

I connect it to my local MySql Workbench and its connected and worked. 

then in Wordpress wp-config.php file

Username and Password used the same for my sql instance
host i change it from the localhost and used the public ip address for my sql instance

its connected! but i don't know if this is the best solution, I'm taking exactly about the hostname

Please let me know, all videos i've found on internet is talking about google app engine, why? why not just hosting the code on the VM instance and the database on SQL instance then link it togather using the ip address? 


CONFIDENTIALITY STATEMENT: This communication is an electronic communication within the meaning of the Electronic Communications Privacy Act, 18 U.S.C. sec. 2510. Its disclosure is strictly limited to the recipient(s) intended by the sender of this message. This transmission and any attachments may contain proprietary, confidential, attorney-client privileged information and/or attorney work product. If you are not the intended recipient, any disclosure, copying, distribution, reliance on, or use of any of the information contained herein is STRICTLY PROHIBITED. Please destroy the original transmission and its attachments without reading or saving in any matter and confirm by return email.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/f94ec343-4600-441c-be56-fe162ca4a07f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment