Trending February 2024 # How To Setup Http(S) Load Balancing In Google Cloud With Cdn # Suggested March 2024 # Top 8 Popular

You are reading the article How To Setup Http(S) Load Balancing In Google Cloud With Cdn updated in February 2024 on the website We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested March 2024 How To Setup Http(S) Load Balancing In Google Cloud With Cdn

Here we will set up WordPress, Nginx, PHP, Cloud SQL, and Cloud Storage for your Load Balancer.

Carefully follow this tutorial without missing any steps for a successful setup.


HTTP(S) Load Balancing can be configured and updated through three different interfaces:

gcloud command-line tool

Google Cloud Platform Console

Rest API

Steps to setup Load Balancing on Google Cloud

Enable APIs and create a Service account

Nginx configuration for Load Balancer

Create Health Check

Create Instance Template

Create a Managed Instance Group

Reserve Global Region IPv4 and IPv6 addresses

Create Load Balancer

Install LetsEncrypt SSL Certificate

Configure DNS and setup Cloud CDN


If you have all the above mentioned required requisites done and in place, you can proceed to setup Load Balancing.

Enable APIs and create a Service account

In step 1

Enter Service account Name

In step 2

Select Role

In step 3

Choose Key type as JSON

Nginx Configuration for Load Balancer

If you have followed the WordPress setup above

Now you need to modify your Nginx configuration file to accept connections from Load Balancer, so edit the file

server { listen [::]:80; listen 80;


index chúng tôi chúng tôi index.php;

set $skip_cache 0;

if ($request_method = POST) { set $skip_cache 1; }

if ($query_string != “”) { set $skip_cache 1; }

if ( $cookie_woocommerce_items_in_cart = “1” ){ set $skip_cache 1; }

set $skip_cache 1; }

set $skip_cache 1; }

set $skip_cache 1; }

location = chúng tôi { log_not_found off; access_log off; } location = chúng tôi { allow all; log_not_found off; access_log off; }

location / { try_files $uri $uri/ /index.php?$args; }

location ~ .php$ { try_files $uri =404; fastcgi_split_path_info ^(.+.php)(/.+)$; fastcgi_pass unix:/run/php/php7.2-fpm.sock; fastcgi_index index.php; include fastcgi_params;

fastcgi_cache_bypass $skip_cache; fastcgi_no_cache $skip_cache;

fastcgi_cache_lock on; fastcgi_cache_valid 200 302 60m; fastcgi_cache_valid 301 1h; fastcgi_cache_valid any 1m; fastcgi_pass_header Set-Cookie:Set-Cookie; fastcgi_pass_header Cookie; fastcgi_ignore_headers Cache-Control Expires Set-Cookie; fastcgi_cache_background_update on;

add_header X-Cache $upstream_cache_status;

add_header X-Xss-Protection “1; mode=block” always; add_header X-Frame-Options “SAMEORIGIN” always; add_header X-Content-Type-Options “nosniff” always; add_header Referrer-Policy “origin-when-cross-origin” always; add_header Strict-Transport-Security “max-age=31536000; includeSubdomains; preload”; }

expires 365d; add_header Cache-Control “public”; }

expires 7d; add_header Cache-Control “public”; }

expires 30d; add_header Cache-Control “public”;

types {font/opentype otf;} types {application/ eot;} types {font/truetype ttf;} types {application/font-woff woff;} types {font/x-woff woff2;} } }

Now edit the /etc/nginx/nginx.conf file and change the value of keepalive_timeout directive to 650s and save the file.

Connect to Cloud SQL

As the instances are created dynamically you ned to connect to Cloud SQL using Cloud SQL proxy or with Private IP.

Using Cloud SQL proxy

Change hostname to

Using Private IP

Go to your Cloud SQL Instance and enable Private IP.

Change hostname to PRIVATE_IP_ADDRESS

While using Private IP, make sure you are using the same VPN network.

Below define('DB_COLLATE', ''); add the following

define('FORCE_SSL_ADMIN', true); $_SERVER['HTTPS']='on'; Create Instance Template

In Name enter a unique name

In Source select Disk

In Source Disk select the disk of your VM Instance

In Name enter name of the template

In Machine type choose 1 vCPU 3.75 GB RAM

Choose the Image that you created earlier

In the Boot disk type select SSD persistent disk

In Identity and API access choose Allow full access to all Cloud APIs

In Firewall check both Allow HTTP traffic and Allow HTTPS traffic

Cloud SQL Proxy connection

If you are using the Private IP address to connect to Cloud SQL, you can skip the startup script.

In the Management tab find the Startup script and enter the following

#! /bin/bash sudo apt-get update sudo apt-get install mysql-client chmod +x cloud_sql_proxy sudo mkdir /cloudsql; sudo chmod 777 /cloudsql ./cloud_sql_proxy -instances=



Replace the INSTANCE_CONNECTION_NAME with your Cloud SQL connection name

In the Networking tab make sure Premium is selected in Network Service Tier

Create a Managed Instance Group

In Name enter name

In Location choose Single-zone

In Region choose your preferred region

In Group type choose Managed instance group

In Instance template select the instance template you just created

Reserve Global Region IPv4 and IPv6 Address

In Name enter a name for IPv4 address

In Network Service Tier choose Premium

In IP version choose IPv4

In Type choose Global

In Name enter a name for IPv6 address

In Network Service Tier choose Premium

In IP version choose IPv6

In Type choose Global

Create Load Balancer Backend configuration

Enter a name for your backend service

In Backend Type choose Instance group

In Backends select the Instance group you created

In Port numbers enter 80

In Balance mode choose Utilization

Check Enable Cloud CDN

Create Health Check

In Name enter a health check name

In Protocol select TCP

In Port enter 80

In Proxy protocol select None

In Check Interval enter 10

In Timeout enter 5

In Healthy threshold enter 2

In Unhealthy threshold enter 3

Frontend Configuration

Enter a name for your IPv4 frontend configuration

In Protocol select HTTPS

In IP version select IPv4

In IP address select the IP4 address you reserved

In Certificate select Create Certificate

Enter a name for your certificate

In Create mode choose to Create Google-managed certificate

This setting will issue a Google managed Let’sEncrypt Certificate.

Attention: Once you have created a certificate it will be in the PROVISION status. Once the certificate is ACTIVE, you’ll have SSL issues for a few minutes with the error message ERR_SSL_VERSION_OR_CIPHER_MISMATCH. It took 15 minutes for mine to have everything up and running.

Uploading your own Certificate

To upload your own certificate, In Create mode choose to Upload my certificate

Here we use the Let’s Encrypt SSL certificate as an example

If you haven’t setup SSL in your VM instance, please check Installing SSL in Google Cloud Platform

SSH your VM Instance and enter the following commands and copy all contents

In Public key certificate copy and paste the contents of fullcahain.pem file

In Certificate chain copy and paste the contents of cert.pem file

In Private key  copy and paste the contents of privkey.pem file

Enter a name for your IPv6 frontend configuration

In Protocol select HTTPS

In IP version select IPv6

In IP address select the IPv6 address you reserved

In Certificate select the certificate you just created

That’s all now your Backend and Frontend are configured

Configure DNS and Setup Cloud CDN

Edit the A record and replace the IPv4 address with your newly reserved IPv4 address.

In Resource record type select AAAA record

Enter the IPv6 address that you reserved

In Origin select the Load balancer you just created.

Next you can set up Cloud Armor to secure your application.

That’s all, now your Load Balancer is configured to scale your website horizontally with Nginx web server

You're reading How To Setup Http(S) Load Balancing In Google Cloud With Cdn

How To Fix Http Error 431 In Google Chrome? – Webnots

Browsers like Google Chrome will send HTTP requests to server whenever you open a webpage. In the backend, there are useful information sent in the request header as well as received in the response header. However, you will not see all these header information and Chrome will only show the response of the body from the server. During this communication there could be lot of glitches and HTTP error 431 is one such a problem. If you are frequently seeing 431 code in Chrome, here is how to fix the issue.

HTTP Status Code 431  

Status code 431 indicates “Request Header Fields Too Large” and the server denied processing the request due this reason. Since all 4xx status codes are due to wrong request from the browser, troubleshooting of 431 error needs to start from analyzing the HTTP request headers sent from Chrome. In addition, there are other possible reasons for 431 error. Try the following fixes and check whether it could help to resolve the issue in Chrome.

Note: Some of these fixes are highly technical and meant for website owners who try to fix 431 HTTP error on their own site.  

1. Check HTTP Request Headers Size

Though there are no size limit for the individual and total HTTP header sizes, web servers may reject larger requests due to safety reasons. You can easily check the header size in Chrome Developer Tools to understand whether the size is the root cause.

Generally, each header request should be of few KBs to few hundred KBs in size. If you see very large size request then that could be the reason for 431 error. If you are the website owner, test the site by removing the request from your site or use testing extensions like ModHeader to confirm the problem. If you are not the site owner, then you can inform the site owner through social media accounts and ask for the fix.

2. Delete Browser Cache and Cookies

Find Cookie Used on Webpage Document Level

Sometimes, this cookie length can be extremely long and dynamic like when you login to membership websites. The best option is to delete all the cookies in Chrome and check if that helps to fix 431 error. Remember to log out of all other sites before deleting cookies. Otherwise, you will be forcibly logged out as deleting the cookie will lead to session expiry.

Delete Cookies in Chrome

3. Delete Referrer Query Parameters in URL 4. Disable All Extensions

Generally, extensions will not cause 431 error in Chrome. However, there could be mistakes while using certain extensions like HTTP header modification extensions. If you have mistaken applied the modifications for the all the sites you visit, then there are chances you get unexpected errors like 431. Check your extensions and add filters to apply the HTTP modifications for only required URLs. Otherwise, simply go to “chrome://extensions/” page and disable all extensions. Now check the pages are loading without any error.

Disable All Chrome Extensions

If installed extensions are causing the problem, you may need to enable one by one to narrow down the item that causes the error. Once you find the problematic extension, uninstall it and find another alternative.  

Final Words

Cookies and lengthy referral URLs are the most common reasons causing 431 HTTP error in Chrome. However, if you are a website owner or developer testing HTTP headers, then there are lot of possibilities the tool or extension you are using is causing the issue. In such a case, disable all extensions and check the HTTP header size to troubleshoot the problem.

How To Use Multiple Phones With Scrcpy. Setup Two Phones With Scrcpy.

If you are using SCRCPY and would like to know how to run multiple devices at the same time. This article will cover the steps involved that allow you to run two or more devices at the same time using SCRCPY. The steps in this guide are a little more complicated than previous versions so follow along very closely.

Related: How to set up and use SCRCPY for Android versions 5 to 10. SCRCPY v1.17 & newer

SCRCPY is by far the best tool on the market for screen sharing and controlling your Android device on Windows 10 and 11. It’s free, easy to use, has a ton of options and works flawlessly with incredible quality. It also has a wireless mode if you don’t want to constantly be connected with a cable. On top of all that, SCRCPY has a truckload of shortcuts and configurable options that allow you to use it in any way you can dream of. We’ve covered just about everything SCRCPY related on our YouTube channel, so check out our SCRCPY Playlist here.

However, one of the most popular requests surrounding SCRCPY has been surrounding the use of multiple devices. For instance, if you wish to mirror multiple Android devices to the same Windows PC. Although using SCRCPY for a single device is quick and easy, using multiple devices is a little more complicated but certainly still doable. So follow along as we get started.

How do you use more than one device with SCRCPY? SCRCPY Multiple device setup guide.

Once the Command window is open, you’ll need to point Command prompt to the folder you have SCRCPY in.


Note: If you have your SCRCPY folder on a different drive, not C: you’ll need to change the drive location first. To do this simply type the drive letter followed by a colon ( : ) and press Enter. It should look like this D: If you get stuck there is a video in the SCRCPY Playlist that shows you this process.

adb devices -l

This will show you the serial number for the devices you have connected to your computer.

scrcpy –serial


Note: Replace 0123456789abcdef with the serial number of the device you want to connect.

When the command runs it will open that device in a SCRCPY window.

Repeat this process for each and every extra device you wish to open using SCRCPY.

As far as I’m aware, there isn’t a limit to how many devices you can run at the same time using SCRCPY, however, you will probably run out of USB ports at some stage.

Using multiple devices with SCRCPY Wireless?

Note: Replace with the IP address of the device you want to connect.

How to create a Batch file (.bat file) that will do all of this automatically for you?

How To Setup Hdmi Digital Playback In Linux

Like many people, I have an HDTV in my house that supports HDMI input devices, such as Blu-ray players. I also like to watch streaming content over the Internet, downloaded videos, and listen to music all from my TV and home theater system. Unfortunately, I do not have a Boxee box or a Roku box. All I have is a Blu-ray player that supports very few video formats and only offers a few streaming options, such as Netflix.

Fortunately, I can run Boxee from any computer, but rather than buying a dedicated box just for that, I can use my Eee PC, which has HDMI output. Many laptop manufacturers are adding HDMI out connectors to their devices specifically for this purpose, so that customers can display their content on big screen televisions.

If you happen to be one of those people and have chosen Linux for your laptop or computer with HDMI out, this brief tutorial should help you get video and sound working.

Initial Preparation

Generally speaking, if your computer or laptop has an HDMI connector, it will play fullscreen HD videos. All you need to do is configure Linux to use it. From my experience, current versions of most Linux distributions will treat an HDMI output just like a VGA out, needing very little configuration. It should auto-detect your external screen, even if it does not immediately display anything. You can use a tool like XRandR, Disper, or nvidia-settings to easily setup the resolution settings you want.

For example, your XRandR or Disper string may look like this:














1280x720 Audio Setup

HDMI video was the easy part. Unfortunately, various Linux audio systems view an HDMI audio output in different ways. If you are using Ubuntu or another distribution that uses Pulseaudio, you should use the Pulseaudio Volume Control program. To use it:

1. Press Alt+F2, type “pavucontrol”, and press Enter

By default, the Profile will be something like “Analog Stereo Duplex”. “Analog” refers to your device’s normal speakers.

4. Select “Digital Stereo (HDMI) Output” from the list.

Now all audio will be routed through the TV’s speakers.

In KDE, any players that use Phonon, such as Dragon Player or Amarok, use KDE’s configuration settings, and you can select the HDMI output from there as well. To do this:

1. Open System Settings

No Pulseaudio or Phonon

If you only need to turn on HDMI audio for a particular application, such as XBMC, simply configure the individual application to use the HDMI output.

For other applications that do not have built-in digital playback support, you will need to configure Alsa manually. Boxee, for example, should work just like XBMC, but there appears to be a bug that prevents digital output. The first thing you need to do is find out which device number your HDMI out is using. From a terminal, type:



Look for devices with “hw” in front, and one of them should include HDMI that looks similar to this:








As you can see in this example, my audio card is “NVidia”, and the device number is “3”. Assuming you only have one card, the card number will be 0.

Next, create a text file in your home directory called “asoundrc-hdmi”, and include the following (replacing “hw:0,3” with your actual device number):




dmix ipc_key




ipc_perm 0660 slave























plug slave.pcm



Save the file. If you already have a default .asoundrc file, you should back it up and copy the asoundrc-hdmi to .asoundrc


.asoundrc asoundrc-backup


asoundrc-hdmi .asoundrc

If you want to switch to this setting every time your media program starts, you could create a script:






































asoundrc-hdmi HD Playback

Now all of your HDMI video and audio should run smoothly, and you did not have to purchase a media center box to get it.

Tavis J. Hampton

Tavis J. Hampton is a freelance writer from Indianapolis. He is an avid user of free and open source software and strongly believes that software and knowledge should be free and accessible to all people. He enjoys reading, writing, teaching, spending time with his family, and playing with gadgets.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.

By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time.

How To Setup Maintenance Mode In WordPress? – Webnots

Coming soon or maintenance mode is single page shown to users for different reasons. May be you are preparing a new site for launching or you are troubleshooting an existing site. In such cases, you should show a coming soon or maintenance mode page to users to avoid them seeing unnecessary details. Also, this is required to avoid search engines indexing your raw data before it is ready for publishing. If you are also using Weebly, learn how to create maintenance mode page for Weebly site?

When to Use Maintenance Mode?

Creating a website needs lot of time. It is unlikely you can create all the content in few hours and launch the entire site. Most of the time, you may need to many days or even months to launch a new website depending the size. The best option here is to create a staging site and start creating your content. Alternatively, you can create localhost website and move to live WordPress site when you are ready.

However, not all webhosting companies offer staging feature and you may not have much time to create local site. The solution here is to create a live WordPress installation and setup a coming soon page till the time your content is ready for publishing.

On other hand, many reasons your live site needs to be taken down like planned maintenance, troubleshooting or migration purposes. In this case, you should setup a maintenance mode page to inform users about the activity and the expected time when your site will be back online. The good part is that you can use single plugin for showing either coming soon or maintenance mode. Alternatively, use a custom code snippet without plugin or use theme options if it is available in your theme.

1. Maintenance Mode with Plugin

Coming Soon WordPress Plugin

Surprisingly, the plugin has 900k+ active installations. We wonder why so many active installations are not going live.

Setup Coming Soon or Maintenance Mode

Though on the “Settings” link under the plugin name or go to the menu item “SeedProd” in the dashboard. Though you will see different tabs on the settings page, you only need setup under “Content Tab”. Most of the options in other tabs like design and subscribers are for pro users. Similarly, except “Settings” menu, all other options for only pro users.

Content Settings

SEO Offer: Optimize your site with Semrush Pro special 14 days free trial.

License Key

The free version does not need any license key. If you want to explore more then purchase the premium version for the price of $29.60 per year for one website. You will get 20% discount on this price when purchased through your WordPress dashboard link.

General Settings

Here you can enable coming soon or maintenance mode. Remember, you will still see the site’s content when you logged in. You should log out or use different browser to see the coming soon page.

General Settings for Coming Soon

Page Settings and Header

You can setup the following details:

Add a logo to show on your page.

Headline and message for your page. Remember to add message relevant for coming soon or maintenance mode.

Add favicon, title, meta description and analytics code under “Header” section.

Header Settings

Viewing Live Preview

Coming Soon Page Preview

Additional Options

You can setup a background image, setup image parameters and add CSS under “Design” tab.

By default, the plugin will exclude login, admin and dashboard pages to avoid lock out of your site. However, you can disable this to include admin pages to show maintenance mode under “Advanced” tab. If you enable this option, then you may need to disable the plugin through FTP to login to your site.

“Advanced” section also has options to add header and footer scripts on your page.

Advanced Settings

2. WP Maintenance Mode Without Plugin

Instead of using a plugin, you can insert the following code snippet in your theme’s chúng tôi file. This is will enable a simple and quick maintenance mode.

function maintenace_mode() { die('Maintenance.'); } } add_action('get_header', 'maintenace_mode');

Learn more about editing chúng tôi file and it should look like below:

Maintenance Mode Code in Functions PHP File

After updating chúng tôi file, make sure to logout of your WordPress admin panel. Open the site’s home or any other page in the browser and you should see a quick maintenance message like below.

Site in Maintenance Mode

3. Using Theme’s Options

Most of the premium themes have a built-in maintenance mode feature which you can use instead of the plugin. For example, the popular Highend theme offers coming soon mode as a module that you can enable whenever you need.

Important Points to Remember

Remember the following points when you setup coming soon or maintenance mode in your site:

Showing coming soon or maintenance mode will hide all the pages on your site.

Regardless of the page, all users, except admin, will see a coming soon or maintenance mode page.

You can still view the pages when logged in to admin panel as an administrator.

If you want to have a new product launch then ensure to create a new post or page and setup countdown timer.

In Hurricane’S Aftermath, Google Is A Priority

In Hurricane’s Aftermath, Google is a Priority

It wasn’t so much the inability to take a hot shower. It wasn’t the inconvenience of having to run to 7-11 for coffee in the morning. It wasn’t the fact that we couldn’t wash clothes, couldn’t watch TV or couldn’t get cool (other than the cold showers.) We were learning to live with the sounds of generators in our neighborhood and we were acquiring a taste for warm beer.

The killer was no Google.

In the aftermath of a hurricane, it’s easy to start appreciating the simple luxuries we take for granted. Hot water, air conditioning, email, gasoline, ice, garage door openers, overhead lights, alarm systems, electric guitars, CD players and batteries.

The local stores were pilfered of D batteries and ice on day one. I found D batteries yesterday at a convenience store. The clerk kept calling me “boss†in that nondescript accent that conjures up images of a third world street market. No one else had them, and Boss could buy them for only $9.99 for four. I bought three packages and grumbled as I exited his store. People had apparently been loading shopping carts full of ice and batteries on the first day of no power, with no regard for others or for rationing. It was every man for himself and the tensions were mounting in the streets. Price gouging was widespread, and in a free market economy, that’s OK, even in times of emergency and natural disasters. The guy calling me “boss†had batteries and no one else did and I needed them for my flashlights. So he made a few bucks per pack. I can forgive him that. He came to this country for the opportunities and opportunity knocked in the form of a hurricane. So he’s got a little to learn about compassion and fairness. I sensed he was new to the USA, so I let it slide. I liked how his D cells were in a box behind the counter, with no prices on them, as if they were contraband or moonshine. He acted like he was selling me drugs. “Come back tomorrow for ice, boss.†Yeah, maybe.

My most trusted friend, the one I turn to for everything, was the one I was most glad to have back. My Google homepage.

Even after days without power, it’s still hard to break the habit of reaching for the light switches. You head to the bathroom and you naturally reach for the wall. “Oh, damn, that’s right. DUH! No power.†And even after days without power, it’s still hard to deny the impulse that says, “I need to Google that.â€

If the truth were told, Google is less of a friend and more of a slave to me. It’s not like I give anything back to Google. It asks nothing of me and does exactly what I tell it to do while expecting no compensation. And as that relationship has developed, I sometimes feel cheated when my slave Google doesn’t deliver my expected results. But then again, I am not Google’s only master.

Google is becoming more and more a victim of the moneygrubbers and the con artists of late. I know you’ve seen what I’m talking about. I’m talking about that first page of results that isn’t exactly what you were looking for. For a while there, it didn’t matter what I searched, the top result was always eBay. Find great prices on dermatologist at eBay? I beg your pardon. That was some tricky SEO going on there and I doubt eBay was directly responsible. But someone figured out how to land at the top for just about everything I wanted to find.

As an SEO guy, I want to keep my buddy Google honest. I want to find real results for what I’m searching for. I don’t want to drive all over town, as it were, searching for D batteries, only to find that the only batteries available in my search results are overpriced. I want to get exactly what I’m after, with no hype and no lies, by at least page one of my search results. You’re the same way. You hate liars and cheaters and thieves, hiding things up their sleeves. You hate when they land in the top spots, paid for or not. And you learn to look past them.

So I started to wonder if maybe it’s time we in the SEO world stopped expecting the top three slots for our clients. Maybe our clients need to be content with a top 10 placement, because in order to beat some of these clowns who are winning, you’re going to need lots of money or lots of tricks, some of them perhaps not exactly ethical. Maybe by now, the searchers – you and me – know better than to look at the top spot. We know that the real meat of our search can be found a little lower. We’re trying to avoid the price-gougers, Boss.

Can we as SEO professionals guarantee the top spot on Google? Do we even want to?

Not having Google made me remember my friend fondly as the perfect deliverer of my every search. But it’s not really. I hated not having my buddy at my side when the power was out. Googlelessness is a sad way to live. But as soon as the lights came back on, glad though I was to have my buddy back, I remembered the flawed slave it really is. Google answers to everyone, and not everyone is playing fair.

Guest Columnist Dave Wilkie is a vice-president and co-founder of Zunch Communications, Inc., a Dallas website design and search engine optimization services company.

Update the detailed information about How To Setup Http(S) Load Balancing In Google Cloud With Cdn on the website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!