Comparision for breaking point when i am using google API and our own CDN and Apache server

import http from "k6/http";
import { check, sleep } from "k6";

export let options = {
  stages: [
    { duration: "0.1m", target: 1 }, // Start with 1 virtual user
    { duration: "0.5m", target: 300}, // Gradually increase to 10 virtual users over 5 minutes
    { duration: "1m", target: 300 }, // Stay at 10 virtual users for 2 minutes

export default function () {
  const videoURL = "";
  const videoDurationSeconds = 10; // Video duration in seconds

  // Generate a random byte range for the Range header
  const startByte = Math.floor(Math.random() * (11.1*1000000); // Change the maximum value based on video size

  // Set the Range header with the random byte range
  const headers = { Range: `bytes=${startByte}-2097152` };

  // Make an HTTP GET request to the video URL with the Range header
  const res = http.request("GET", videoURL, null, { headers });
  // console.log(res);

  check(res, {
    "Status is 206": (r) => r.status === 206, // Partial Content response
    "Correct content type": (r) =>r.headers["Content-Type"] === "video/mp4", 

  // Simulate a delay to represent video playback time

I want to test the breaking point and compare the results but i am getting unexpected result

Apart from getting more successful request using google_api services i m getting low percentage of request sucessful

it’s showing request timeout and request failed !!

so is there any limitation that google_storage service does not allow , or considers my k6 script VU’s as DOS Attack !

please help i m a beginner , i dont know the reason why am i getting request timeout error in less no. of target users

Hi there!

Can you explain what you mean by “breaking point”?

From what I understand, you’re asking why the Google API behaves differently from your own CDN, correct? If so, this is not a question well suited for this forum, as it has nothing to do with k6 itself. You’d get better help somewhere where the discussion is about the Google API.

That said, your script looks fine to me. You might be able to see the failure reasons in the response bodies, and you should always comply with the rate limits of whatever public server you’re testing.

I am getting errors from the client side while testing the script, even Google page does response with a status code 0