I'm quite new to GCP and tried to set up a website on the GCP compute engine. I was aware of egress charges but never thought I will get so much fake traffic from China. I thought of blocking all the traffic from China. But I felt, it would not be the right thing to do. I would like to understand how egress traffic bills a webpage. This may sound amateur or funny, please bear with me.
Scenario 1: Let's assume I have 2 MB size of images in my webpage, and a 20kb html file with youtube video; are in compute engine. I understood that the egress traffic will be calculated on the 2 MB images and 20 kb transferred. But when I/someone play a youtube video that is embedded in the html, is it considered as egress traffic as well?
Scenario 2: The files size is same as above, now, the images are shifted to CDN/Cloud storage and only the html file of 20kb with youtube video is in compute engine. If someone try to access the webpage, will they calculate compute engine egress charges based on the total transfer of 2MB images and 20kb html file? or just the 20kb of html file?
Note: This is not just to cut costs on the billing, I'm just trying to create a effective solution without blocking a country's access to my website. I'm trying to understand the egress traffic from a few days, but I'm not sure if I really understood the core concept.