Skip to content

Conversation

alrod
Copy link
Member

@alrod alrod commented Oct 2, 2025

This PR introduces a streamlined approach to zero-to-one scaling logic within the Azure SDK. The current implementation reads and parses all classic monitoring logs in the $log container to extract modified blob paths. However, for scale-out from zero to one, this level of detail is unnecessary.
The updated logic simplifies the process by checking only for the presence of write operations within the last two hours—without downloading or parsing the full log content. This optimization reduces memory consumption and improves performance, especially in environments with high write volumes.

@Copilot Copilot AI review requested due to automatic review settings October 2, 2025 00:07
@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Oct 2, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements lightweight detection for write operations to optimize the scaling logic performance. Instead of parsing all logs to extract blob paths, it only checks for the presence of write operations to trigger scaling events.

  • Adds a new HasBlobWritesAsync method that efficiently detects write operations without full log parsing
  • Updates the scaling monitor to use the lightweight detection method
  • Removes unused test field and improves logging messages

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
BlobLogListener.cs Adds new HasBlobWritesAsync method for lightweight write operation detection
BlobScalerMonitorProvider.cs Updates scaling logic to use the new detection method and removes unused field
BlobLogListenerTests.cs Adds comprehensive test coverage for the new HasBlobWritesAsync method

Copy link
Member

@amnguye amnguye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This comment I had was just something you didn't know about beforehand, since this change is something that recently happened on the Azure.Storage.Blobs package side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants