Meet industry peers, ask questions, collaborate to find answers, and connect with Googlers who are making the products you use every day.<\/p>", "imageupload.max_uploaded_images_per_upload" : 100, "imageupload.max_uploaded_images_per_user" : 10000, "integratedprofile.connect_mode" : "", "tkb.toc_maximum_heading_level" : "2", "tkb.toc_heading_list_style" : "disc", "sharedprofile.show_hovercard_score" : true, "config.search_before_post_scope" : "community", "tkb.toc_heading_indent" : "15", "p13n.cta.recommendations_feed_dismissal_timestamp" : -1, "imageupload.max_file_size" : 10024, "layout.show_batch_checkboxes" : false, "integratedprofile.cta_connect_slim_dismissal_timestamp" : -1 }, "isAnonymous" : true, "policies" : { "image-upload.process-and-remove-exif-metadata" : true }, "registered" : false, "emailRef" : "", "id" : -1, "login" : "Former Community Member" }, "Server" : { "communityPrefix" : "/qsqph94282", "nodeChangeTimeStamp" : 1740653277400, "tapestryPrefix" : "/gc", "deviceMode" : "DESKTOP", "responsiveDeviceMode" : "DESKTOP", "membershipChangeTimeStamp" : "0", "version" : "24.12", "branch" : "24.12-release", "showTextKeys" : false }, "Config" : { "phase" : "prod", "integratedprofile.cta.reprompt.delay" : 30, "profileplus.tracking" : { "profileplus.tracking.enable" : false, "profileplus.tracking.click.enable" : false, "profileplus.tracking.impression.enable" : false }, "app.revision" : "2502201706-s7223b55626-b92", "navigation.manager.community.structure.limit" : "1000" }, "Activity" : { "Results" : [ ] }, "NodeContainer" : { "viewHref" : "https://www.googlecloudcommunity.com/gc/Cloud-Forums/ct-p/cloud-forums", "description" : "Get answers to your questions and share your knowledge about the Google Cloud.", "id" : "cloud-forums", "shortTitle" : "Cloud Forums", "title" : "Cloud Forums", "nodeType" : "category" }, "Page" : { "skins" : [ "googlecloud", "theme_hermes", "responsive_peak" ], "authUrls" : { "loginUrl" : "https://www.googlecloudcommunity.com/gc/user/userloginpage?dest_url=https%3A%2F%2Fwww.googlecloudcommunity.com%2Fgc%2FServerless%2FGoogle-cloud-run-function-network-is-slow%2Ftd-p%2F832298", "loginUrlNotRegistered" : "https://www.googlecloudcommunity.com/gc/user/userloginpage?redirectreason=notregistered&dest_url=https%3A%2F%2Fwww.googlecloudcommunity.com%2Fgc%2FServerless%2FGoogle-cloud-run-function-network-is-slow%2Ftd-p%2F832298", "loginUrlNotRegisteredDestTpl" : "https://www.googlecloudcommunity.com/gc/user/userloginpage?redirectreason=notregistered&dest_url=%7B%7BdestUrl%7D%7D" }, "name" : "ForumTopicPage", "rtl" : false, "object" : { "viewHref" : "/gc/Serverless/Google-cloud-run-function-network-is-slow/td-p/832298", "subject" : "Google cloud run function network is slow", "id" : 832298, "page" : "ForumTopicPage", "type" : "Thread" } }, "WebTracking" : { "Activities" : { }, "path" : "Community:Google Cloud Community/Category:Google Cloud/Category:Cloud Forums/Board:Serverless/Message:Google cloud run function network is slow" }, "Feedback" : { "targeted" : { } }, "Seo" : { "markerEscaping" : { "pathElement" : { "prefix" : "@", "match" : "^[0-9][0-9]$" }, "enabled" : false } }, "TopLevelNode" : { "viewHref" : "https://www.googlecloudcommunity.com/gc/Google-Cloud/ct-p/google-cloud", "description" : "Find answers, ask questions, and connect with our community of experts.", "id" : "google-cloud", "shortTitle" : "Google Cloud", "title" : "Google Cloud", "nodeType" : "category" }, "Community" : { "viewHref" : "https://www.googlecloudcommunity.com/", "integratedprofile.lang_code" : "en", "integratedprofile.country_code" : "US", "id" : "qsqph94282", "shortTitle" : "Google Cloud Community", "title" : "Google Cloud Community" }, "CoreNode" : { "conversationStyle" : "forum", "viewHref" : "https://www.googlecloudcommunity.com/gc/Serverless/bd-p/cloud_serverless", "settings" : { }, "description" : "Explore topics and ask questions about Cloud Run, Cloud Functions, App Engine, Workflows, and Eventarc.", "id" : "cloud_serverless", "shortTitle" : "Serverless", "title" : "Serverless", "nodeType" : "Board", "ancestors" : [ { "viewHref" : "https://www.googlecloudcommunity.com/gc/Cloud-Forums/ct-p/cloud-forums", "description" : "Get answers to your questions and share your knowledge about the Google Cloud.", "id" : "cloud-forums", "shortTitle" : "Cloud Forums", "title" : "Cloud Forums", "nodeType" : "category" }, { "viewHref" : "https://www.googlecloudcommunity.com/gc/Google-Cloud/ct-p/google-cloud", "description" : "Find answers, ask questions, and connect with our community of experts.", "id" : "google-cloud", "shortTitle" : "Google Cloud", "title" : "Google Cloud", "nodeType" : "category" }, { "viewHref" : "https://www.googlecloudcommunity.com/", "description" : "The official home of Google Cloud and Workspace community forums, learning hub, and community blogs.", "id" : "qsqph94282", "shortTitle" : "Google Cloud Community", "title" : "Google Cloud Community", "nodeType" : "Community" } ] } }; LITHIUM.Components.RENDER_URL = "/gc/util/componentrenderpage/component-id/#{component-id}?render_behavior=raw"; LITHIUM.Components.ORIGINAL_PAGE_NAME = 'forums/v5/ForumTopicPage'; LITHIUM.Components.ORIGINAL_PAGE_ID = 'ForumTopicPage'; LITHIUM.Components.ORIGINAL_PAGE_CONTEXT = 'V-0nBLDBM0gxe4gucBZkxm0TPG44wjl0RtjRqsOQnANkB43HGBBW5MWpz9rlK_mGY7yLK8BKrPVJORuNteaDU985MKh10Esx3YpqsjRVNRTqm4YxF-Zalo2mtEEFQZpw5GKEOL56IAF3HnTYifNL14yTu1q9uU1K1-C5DnwQWD4xGEZMjG2p4rUScwunU79KivQz396v-aGnp6ymwcqrkA5HiL0uGTFz2psB1ZdQAoMiA_3QSdR8XLHzK0SDjkwqznm_0Ofql8R0Oa9QnmPZl2rTr3FaV3NEdcjbYxtf8WbXoNrEMiSzfWQFdr9kZVhBj-TagdMYnNkMbfyTvwYavz-OFKomESdrl0b8mtQdwPqytHzZjUqYxDPlJnxJOQuS'; LITHIUM.Css = { "BASE_DEFERRED_IMAGE" : "lia-deferred-image", "BASE_BUTTON" : "lia-button", "BASE_SPOILER_CONTAINER" : "lia-spoiler-container", "BASE_TABS_INACTIVE" : "lia-tabs-inactive", "BASE_TABS_ACTIVE" : "lia-tabs-active", "BASE_AJAX_REMOVE_HIGHLIGHT" : "lia-ajax-remove-highlight", "BASE_FEEDBACK_SCROLL_TO" : "lia-feedback-scroll-to", "BASE_FORM_FIELD_VALIDATING" : "lia-form-field-validating", "BASE_FORM_ERROR_TEXT" : "lia-form-error-text", "BASE_FEEDBACK_INLINE_ALERT" : "lia-panel-feedback-inline-alert", "BASE_BUTTON_OVERLAY" : "lia-button-overlay", "BASE_TABS_STANDARD" : "lia-tabs-standard", "BASE_AJAX_INDETERMINATE_LOADER_BAR" : "lia-ajax-indeterminate-loader-bar", "BASE_AJAX_SUCCESS_HIGHLIGHT" : "lia-ajax-success-highlight", "BASE_CONTENT" : "lia-content", "BASE_JS_HIDDEN" : "lia-js-hidden", "BASE_AJAX_LOADER_CONTENT_OVERLAY" : "lia-ajax-loader-content-overlay", "BASE_FORM_FIELD_SUCCESS" : "lia-form-field-success", "BASE_FORM_WARNING_TEXT" : "lia-form-warning-text", "BASE_FORM_FIELDSET_CONTENT_WRAPPER" : "lia-form-fieldset-content-wrapper", "BASE_AJAX_LOADER_OVERLAY_TYPE" : "lia-ajax-overlay-loader", "BASE_FORM_FIELD_ERROR" : "lia-form-field-error", "BASE_SPOILER_CONTENT" : "lia-spoiler-content", "BASE_FORM_SUBMITTING" : "lia-form-submitting", "BASE_EFFECT_HIGHLIGHT_START" : "lia-effect-highlight-start", "BASE_FORM_FIELD_ERROR_NO_FOCUS" : "lia-form-field-error-no-focus", "BASE_EFFECT_HIGHLIGHT_END" : "lia-effect-highlight-end", "BASE_SPOILER_LINK" : "lia-spoiler-link", "BASE_DISABLED" : "lia-link-disabled", "FACEBOOK_LOGOUT" : "lia-component-users-action-logout", "FACEBOOK_SWITCH_USER" : "lia-component-admin-action-switch-user", "BASE_FORM_FIELD_WARNING" : "lia-form-field-warning", "BASE_AJAX_LOADER_FEEDBACK" : "lia-ajax-loader-feedback", "BASE_AJAX_LOADER_OVERLAY" : "lia-ajax-loader-overlay", "BASE_LAZY_LOAD" : "lia-lazy-load" }; LITHIUM.noConflict = true; LITHIUM.useCheckOnline = false; LITHIUM.RenderedScripts = [ "plugin.js", "jquery.iframe-shim-1.0.js", "plugin.js", "plugin.js", "TokenInputAutoComplete.js", "plugin.js", "PartialRenderProxy.js", "jquery.css-data-1.0.js", "plugin.js", "ElementMethods.js", "plugin.js", "Dialog.js", "Placeholder.js", "en.js", "jquery.ui.mouse.js", "ThreadedDetailMessageList.js", "ReCaptchaV3.js", "aws-sdk.js", "CustomEvent.js", "InlineMessageReplyContainer.js", "jquery.ui.dialog.js", "jquery.ui.draggable.js", "TinyMceEditor.js", "DropDownMenuVisibilityHandler.js", "plugin.js", "jquery.hoverIntent-r6.js", "plugin.js", "Loader.js", "en.js", "jquery.fileupload.js", "Sandbox.js", "KeepSessionAlive.js", "jquery.iframe-transport.js", "Video.js", "MessageBodyDisplay.js", "plugin.js", "jquery.lithium-selector-extensions.js", "en.js", "plugin.js", "InlineMessageEditor.js", "Components.js", "Link.js", "AjaxSupport.js", "PolyfillsAll.js", "jquery.effects.core.js", "LazyLoadComponent.js", "LiModernizr.js", "Cache.js", "plugin.js", "jquery.tools.tooltip-1.2.6.js", "ProductsField.js", "InformationBox.js", "prism.js", "MessageViewDisplay.js", "Events.js", "plugin.js", "Lithium.js", "BlockEvents.js", "NoConflict.js", "DropDownMenu.js", "jquery.autocomplete.js", "SpoilerToggle.js", "SearchForm.js", "OoyalaPlayer.js", "plugin.js", "Forms.js", "jquery.scrollTo.js", "jquery.clone-position-1.0.js", "en.js", "Globals.js", "jquery.lithium-toastmessage.js", "en.js", "plugin.js", "InputEditForm.js", "plugin.js", "Text.js", "theme.js", "jquery.ui.core.js", "jquery.tokeninput-1.6.2.js", "tinymce-patched.js", "ResizeSensor.js", "EarlyEventCapture.js", "jquery.js", "plugin.js", "HelpIcon.js", "plugin.js", "en.js", "jquery.position-toggle-1.0.js", "Auth.js", "DataHandler.js", "json2.js", "UserListActual.js", "MessageEditor.js", "jquery.blockui.js", "jquery.function-utils-1.0.js", "jquery.appear-1.1.1.js", "ElementQueries.js", "jquery.viewport-1.0.js", "jquery.tmpl-1.1.1.js", "brightcove_uploader.js", "en.js", "plugin.js", "jquery.ui.resizable.js", "en.js", "ForceLithiumJQuery.js", "api.js", "jquery.ajax-cache-response-1.0.js", "ActiveCast3.js", "FieldSet.js", "jquery.json-2.6.0.js", "AjaxFeedback.js", "InlineMessageReplyEditor.js", "SearchAutoCompleteToggle.js", "plugin.js", "plugin.js", "jquery.placeholder-2.0.7.js", "en.js", "jquery.delayToggle-1.0.js", "DeferredImages.js", "jquery.ui.widget.js", "CookieBannerAlert.js", "Namespace.js", "Throttle.js", "plugin.js", "Tooltip.js", "jquery.ui.position.js", "AutoComplete.js", "plugin.js", "jquery.effects.slide.js", "plugin.js", "en.js" ];(function(){LITHIUM.AngularSupport=function(){function g(a,c){a=a||{};for(var b in c)"[object object]"===Object.prototype.toString.call(c[b])?a[b]=g(a[b],c[b]):a[b]=c[b];return a}var d,f,b={coreModule:"li.community",coreModuleDeps:[],noConflict:!0,bootstrapElementSelector:".lia-page .min-width .lia-content",bootstrapApp:!0,debugEnabled:!1,useCsp:!0,useNg2:!1},k=function(){var a;return function(b){a||(a=document.createElement("a"));a.href=b;return a.href}}();LITHIUM.Angular={};return{preventGlobals:LITHIUM.Globals.preventGlobals, restoreGlobals:LITHIUM.Globals.restoreGlobals,init:function(){var a=[],c=document.querySelector(b.bootstrapElementSelector);a.push(b.coreModule);b.customerModules&&0

Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Google cloud run function network is slow

We have a simple cloud run function that does video processing and uploads processed videos to youtube. We have configured our function to have at least one instance running.

We are seeing very low network bandwidth when downloading videos from S3 or when uploading them to youtube. Given both uploads and downloads are slow, we suspect this is an issue with your cloud run function setup.

Any advice on how to get better networking performance here?

Thanks!

0 1 179
1 REPLY 1

Hi @rkolluri,

Welcome to the Google Cloud community!

Based on the video processing that your Cloud Run function is designed to do, I'd assume you're using Amazon S3 and Youtube Data API which are essential for this task.

There are numerous factors that may affect the network bandwidth during the video processing task. Here are some of the areas to look into to identify the root cause:

  • Verify the instance location. If your S3 bucket and your Cloud Run function both differ in region, there's a possibility that this may affect the download speed. It's worth a shot to check if certain adjustments are needed. Perhaps making sure that both ends can be in the same or if not -- close in region.
  • Evaluate the need to increase your function's resource allocation. When there's a sudden increase of requests going on for your function during autoscaling, there are times that Cloud Run may take time when allocating resources. Limits in terms of CPU and memory allocation for a function could also affect the network bandwidth for data transfers. It's best to evaluate whether this may be the right time to increase CPU/Memory allocation for your Cloud Function.
  • Check the network speed by making direct calls to the external APIs: For this one, see first if there's a way you can test the performance when connecting to (1) your S3 bucket in terms of downloading objects and (2) making API calls to Youtube Data API in terms of uploading a video. While Cloud Run function is out of the picture, is the network speed normal as expected? Is the download or upload speed still slow?
  • Also bear in mind the network bandwidth limitations leaning on both S3 and Youtube. In addition to the previous tip above, perhaps there are network limits, speed or bandwidth issues arising due to external factors affecting the services involved in S3 (you may also check this post for detailed guide). For Youtube API, hitting certain quotas and rate limits could also be a contributing factor.

Lastly, make sure to log the performance and output of your Cloud Run function and see if from there, you can get more information about the way your function starts, executes and finishes its intended task -- and the length of time it takes to go from one milestone to the next. Also, this is one way to track your code (through a console log) if it's returning any errors or warnings that provide more clues about what more could be happening.

Hope this helps.