{"id":6191,"date":"2019-12-11T17:11:10","date_gmt":"2019-12-11T10:11:10","guid":{"rendered":"http:\/\/gcloudvn.wam.vn\/tong-quan-ve-toi-uu-hoa-chi-phi-networking\/"},"modified":"2023-07-12T17:34:19","modified_gmt":"2023-07-12T10:34:19","slug":"networking-cost-optimization-best-practices-an-overview","status":"publish","type":"post","link":"https:\/\/gcloudvn.com\/en\/kienthuc\/networking-cost-optimization-best-practices-an-overview\/","title":{"rendered":"Networking cost optimization best practices: an overview"},"content":{"rendered":"<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Every cloud deployment needs a network over which to move data. Without a network, you can\u2019t view cat videos or upload your selfies, much less allow microservices to talk to one another.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\"><a href=\"https:\/\/gcloudvn.com\/en\/google-cloud-platform\/\">Google Cloud<\/a> Provide a diverse, scalable, global network of cloud-based services and requirements, and it&#039;s how you use the network that affects the following four aspects of deployment: cost , security, performance, and availability.\u00a0<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">When designing a reliable, sound, yet cost effective network architecture, you\u2019ll want multiple teams within the company to weigh in on these four elements, to determine your priorities. The following tips highlight a few considerations you should think about when architecting your network solution.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">(Note that we\u2019ll focus here on optimizing network cost. Check out our blog for cost optimizations on <\/span><a href=\"https:\/\/gcloudvn.com\/en\/cloud-storage\/\"><span style=\"font-weight: 400;\">Cloud Storage<\/span><\/a><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">BigQuery<\/span><span style=\"font-weight: 400;\">.)<\/span><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14566 size-full\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2019\/08\/home-campaign-anthos.jpg\" alt=\"Networking cost optimization best practices: an overview\" width=\"484\" height=\"324\" \/><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/gcloudvn.com\/en\/kienthuc\/networking-cost-optimization-best-practices-an-overview\/#Dong_du_lieu_va_quan_sat\" >Flow and behold<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/gcloudvn.com\/en\/kienthuc\/networking-cost-optimization-best-practices-an-overview\/#Ten_nghia_la_gi_Vi_sao_trong_cung_mot_khu_vuc_nhung_gia_khong_giong_nhau\" >What\u2019s in a name? That which we call a region might not cost the same<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/gcloudvn.com\/en\/kienthuc\/networking-cost-optimization-best-practices-an-overview\/#VPN_hay_khong_VPN\" >To VPN or not to VPN?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/gcloudvn.com\/en\/kienthuc\/networking-cost-optimization-best-practices-an-overview\/#Network_cua_ban_duoc_toi_uu_hoa_nho_Network_Tiers\" >Your network optimized your way with Network Tiers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/gcloudvn.com\/en\/kienthuc\/networking-cost-optimization-best-practices-an-overview\/#%E2%80%9CWaste_not_want_not%E2%80%9D\" >\u201cWaste not, want not\u201d<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/gcloudvn.com\/en\/kienthuc\/networking-cost-optimization-best-practices-an-overview\/#Tiet_kiem_tung_goi_dich_vu_la_tiet_kiem_tung_dong\" >A packet saved is a penny earned<\/a><\/li><\/ul><\/nav><\/div>\n<h2 style=\"padding-left: 40px; text-align: justify;\"><span class=\"ez-toc-section\" id=\"Dong_du_lieu_va_quan_sat\"><\/span><span style=\"font-size: 18pt;\"><b>Flow and behold<\/b><\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">The first step when reviewing your overall networking spend strategy is to understand what you\u2019re using, namely, what traffic is flowing in and out of your Google Cloud Platform (GCP) environment. This is easy to do with <\/span><span style=\"font-weight: 400;\">VPC Flow Logs<\/span><span style=\"font-weight: 400;\">, which keeps records of the flow of data sent and received by VM instances. Each detailed stream log includes information such as source IP, destination IP, and bytes sent and received for each network connection\u2014exactly the information needed to understand the health of your network traffic. These logs are collected in Stackdriver logs, which you can then export to <a href=\"https:\/\/gcloudvn.com\/en\/bigquery\/\">BigQuery Google<\/a>\u00a0to help you easily view system traffic visually. Some of the use cases for VPC Flow Logs include: network monitoring, technical testing, real-time security analysis and for other requirements, cost optimization.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">When it comes to optimizing networking spend, the most relevant information in VPC Flow Logs is:<\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Traffic between regions and zones<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Traffic to specific countries on the Internet<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Top talkers<\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Here are <\/span><span style=\"font-weight: 400;\">step-by-step instructions<\/span><span style=\"font-weight: 400;\"> on how to enable VPC Flow logs.\u00a0<\/span><\/p>\n<h2 style=\"padding-left: 40px; text-align: justify;\"><span class=\"ez-toc-section\" id=\"Ten_nghia_la_gi_Vi_sao_trong_cung_mot_khu_vuc_nhung_gia_khong_giong_nhau\"><\/span><strong>What\u2019s in a name? That which we call a region might not cost the same<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">The information you get from VPC Flow Logs can help you determine where you might be able to save on your existing network costs. For example, <\/span><b>geo location<\/b><span style=\"font-weight: 400;\"> is an important factor to consider when architecting for optimal spend. Not all network charges are created equal; different regions have varying network costs. As well as using VPC Flow Logs, you can also take advantage of the recently released network monitoring, verification and optimization platform, <\/span><span style=\"font-weight: 400;\">Network Intelligence Center<\/span><span style=\"font-weight: 400;\">, which allows you to  view the network bandwidth in use between regions and geo locations. When transferring data around the world either to customers or to other internal services in your GCP environment, the ability to drill down and understand your traffic patterns across regions is crucial.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">For general internet egress charges, e.g., a group of web servers that serve content to the internet, prices can vary depending on the region where those servers are located. For instance, the price per GB in us-central1 is cheaper than the price per GB in asia-southeast1. Another example is traffic flowing between GCP regions, which can vary significantly depending on the location of those regions\u2014even if it isn\u2019t egressing out to the Internet. For example, the cost to synchronize data between asia-south1 (India) and asia-east1 (Taiwan) is five times as much as synchronizing traffic between us-east1 (South Carolina) and us-west1 (Oregon).<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">As well as regional considerations, you should also consider which zones your workloads are in, as depending on their availability requirements, you may be able to architect them to use intrazone network traffic at no cost. You read that right, at no cost! Consider your VMs communicating via public, external IP addresses, but that are in the same region or zone. By configuring them to communicate via their internal IP address, you can save on the cost of what you would have paid for that traffic communicating via external IP addresses.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Keep in mind, you\u2019ll need to weigh any potential network cost saving with the availability implications of a single-zone architecture. Deploying to only a single zone is not recommended for workloads that require high availability, but it can make sense to have certain services use a VPC network within the same zone. One example could be to use a single-zone approach in regions that have higher costs (Asia), but a multi-zone or multi-regional architecture in North American where the costs are lower.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Once you have established what your network costs are for an average month, you may want to consider a few different approaches to better allocate spending. Some customers re-architect solutions to bring applications closer to their user base, and some employ Cloud CDN to reduce traffic volume and latency, as well as potentially take advantage of CDN\u2019s lower costs to serve content to users. Both of these are viable options that can both reduce costs and\/or enhance performance.<\/span><\/p>\n<h2 style=\"padding-left: 40px; text-align: justify;\"><span class=\"ez-toc-section\" id=\"VPN_hay_khong_VPN\"><\/span><strong>To VPN or not to VPN?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Next in line when reviewing overall networking spend is total bytes transferred. Using VPC Flow Logs, you can see the \u201cTop Talkers\u201d within your environment, and if you\u2019re pushing large amounts of data, you want to ensure that you take advantage of any potential discounts you might be entitled to.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">We have seen many customers who push large amounts of data on a daily basis from their on-premises environment to GCP, either using a VPN or perhaps directly over the Internet (encrypted with SSL hopefully!). Some customers, for example, have databases on dedicated, on-prem hardware, whereas their frontend applications are serving requests in GCP. If this describes you, consider whether you should leverage a <\/span><span style=\"font-weight: 400;\">Dedicated Interconnect<\/span><span style=\"font-weight: 400;\"> or <\/span><span style=\"font-weight: 400;\">Partner Interconnect<\/span><span style=\"font-weight: 400;\">. If you push large amounts of data (think TBs\/PBs) on a consistent basis, it can be cheaper to establish a dedicated connection vs. accruing costs associated with your traffic traversing the public internet or using a VPN.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">There are a few architectural considerations to review when selecting an Interconnect, which you can read about in further detail <\/span><a href=\"https:\/\/cloud.google.com\/interconnect\/docs\/concepts\/dedicated-overview\" target=\"_blank\" rel=\"nofollow noopener\"><span style=\"font-weight: 400;\">here<\/span><\/a><span style=\"font-weight: 400;\">.\u00a0<\/span><\/p>\n<h2 style=\"padding-left: 40px; text-align: justify;\"><span class=\"ez-toc-section\" id=\"Network_cua_ban_duoc_toi_uu_hoa_nho_Network_Tiers\"><\/span><strong>Your network optimized your way with Network Tiers<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">One of Google Cloud\u2019s biggest differentiators is having access to Google\u2019s premium network backbone, which is used by default for all services. But you might not need that performance and low latency for all your services. An example might be the distribution of a daily sales report that doesn\u2019t need to be immediately available around the globe. With services for which you are willing to trade off between performance and cost, we offer <\/span><span style=\"font-weight: 400;\">Network Service Tiers<\/span><span style=\"font-weight: 400;\">.\u00a0<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">By choosing either Standard or Premium Tier, you can allocate the appropriate connectivity between your services, fine-tuning the network to the needs of your application and potentially reducing costs on services that might tolerate more latency and don\u2019t require an SLA.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">There are some limitations when leveraging the Standard tier for its pricing benefits. At a high level, these include compliance needs around traffic traversing the public internet, as well as HTTP(S), SSL Proxy, TCP Proxy load-balancing, or usage of Cloud CDN. You can read about these in more detail <\/span><a href=\"https:\/\/cloud.google.com\/network-tiers\/docs\/overview#tiers-gfe-lb-cloud-storage\" target=\"_blank\" rel=\"nofollow noopener\"><span style=\"font-weight: 400;\">here<\/span><\/a><span style=\"font-weight: 400;\">. After reviewing some of the recommendations, you\u2019ll be empowered to review your services with your team and determine whether you can benefit from lower Standard Tier pricing without impacting the performance of your external-facing services.<\/span><\/p>\n<h2 style=\"padding-left: 40px; text-align: justify;\"><span class=\"ez-toc-section\" id=\"%E2%80%9CWaste_not_want_not%E2%80%9D\"><\/span><strong>\u201cWaste not, want not\u201d<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">The above topics are some of the larger levers you can pull when conducting a networking cost review. But overall you should ensure that you are taking advantage of one of the greatest cloud benefits: pay only for what you use. With this in mind, we recommend reviewing the following to ensure you get the most out of your GCP investment:<\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li style=\"font-weight: 400;\"><b>Log generation<\/b><span style=\"font-weight: 400;\"> for services like VPC Flow Logs, Firewall Rule Logging, and NAT Logging. Enable and <\/span><a href=\"https:\/\/cloud.google.com\/vpc\/docs\/using-flow-logs#log-sampling\" target=\"_blank\" rel=\"nofollow noopener\"><span style=\"font-weight: 400;\">customize these logs<\/span><\/a><span style=\"font-weight: 400;\"> where possible to reduce costs.<\/span><\/li>\n<li style=\"font-weight: 400;\"><b>Private Access for enterprise or high volume customers<\/b><span style=\"font-weight: 400;\"> \u2013 Leverage <\/span><span style=\"font-weight: 400;\">Private Google Access<\/span><span style=\"font-weight: 400;\"> when possible to reduce cost and improve your security posture.<\/span><\/li>\n<li style=\"font-weight: 400;\"><b>External IP Addresses<\/b><span style=\"font-weight: 400;\"> \u2013 Starting in 2020, external IP addresses that don\u2019t fall under the <\/span><span style=\"font-weight: 400;\">Free Tier<\/span><span style=\"font-weight: 400;\"> will incur a <\/span><span style=\"font-weight: 400;\">small cost<\/span><span style=\"font-weight: 400;\">. However, as a general security best practice, it\u2019s a good idea to use internal IP addresses where applicable. For information on how to migrate to internal IPs, refer to our guides for <\/span><span style=\"font-weight: 400;\">building internet connectivity for private VMs<\/span><span style=\"font-weight: 400;\"> or <\/span><span style=\"font-weight: 400;\">Set up a private cluster on <a href=\"https:\/\/gcloudvn.com\/en\/google-kubernetes-engine-gke\/\">Google Kubernetes Engine<\/a><\/span><span style=\"font-weight: 400;\">.<\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Reviewing the above will ensure you are eliminating wasteful spending within your design, and also ensure that you are taking full advantage of your cloud-based solution.<\/span><\/p>\n<h2 style=\"padding-left: 40px; text-align: justify;\"><span class=\"ez-toc-section\" id=\"Tiet_kiem_tung_goi_dich_vu_la_tiet_kiem_tung_dong\"><\/span><strong>A packet saved is a penny earned<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Balancing costs with performance, availability, and security is no simple feat, often requiring collaboration across multiple teams. We like to think that there are many approaches to consider, and more often than not, cost optimization is not so much a one time review, but your application teams\u2019 philosophy. Hopefully this post will give you food for thought when reviewing your network designs. Click here to learn more about Google Cloud\u2019s <\/span><span style=\"font-weight: 400;\">networking portfolio<\/span><span style=\"font-weight: 400;\">. And for more on cost optimization, check out these blogs on cost optimization for <\/span><span style=\"font-weight: 400;\">Cloud Storage<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">BigQuery<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p style=\"text-align: right;\"><strong>Source: <a href=\"https:\/\/gcloudvn.com\/en\/\">Gimasys<\/a><\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p>M\u1ed7i khi tri\u1ec3n khai d\u1ecbch v\u1ee5 cloud b\u1ea1n \u0111\u1ec1u c\u1ea7n \u0111\u1ebfn network \u0111\u1ec3 chuy\u1ec3n d\u1eef li\u1ec7u. N\u1ebfu kh\u00f4ng c\u00f3 internet, b\u1ea1n kh\u00f4ng th\u1ec3 xem video hay t\u1ea3i h\u00ecnh \u1ea3nh, v\u00e0 r\u1ea5t nhi\u1ec1u ti\u1ec7n \u00edch kh\u00e1c \u0111\u1ec3 giao ti\u1ebfp v\u1edbi ng\u01b0\u1eddi&hellip;<\/p>","protected":false},"author":1,"featured_media":6192,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1,135],"tags":[],"class_list":["post-6191","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kienthuc","category-google-cloud-platform","entry","has-media"],"_links":{"self":[{"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/posts\/6191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/comments?post=6191"}],"version-history":[{"count":0,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/posts\/6191\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/media\/6192"}],"wp:attachment":[{"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/media?parent=6191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/categories?post=6191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/tags?post=6191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}