Enes Canca
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Main Record of Alerting As A Service * **Date:** 2022-12-09 * **Status:** proposed * **Deciders:** Enes Canca * **Consulted:** Team Beholder * **Informed:** Team Beholder # Architecture Design Record ## Context and Problem Statement We are currently using VictoriaMetrics for long-term storage of metrics and time-series data. VictoriaMetrics is a high-performance time-series database that has performed well over the last year, but it is no longer able to meet the needs of our rapidly growing scale. As the volume and velocity of data increases, VictoriaMetrics is becoming unreliable and is unable to provide the level of availability and performance that we require. To address this problem, we need a scalable and cost-effective storage solution that can handle large amounts of time-series data with low latencies and high availability. The solution should be based on Prometheus, as we already use Prometheus for monitoring and alerting, and it will be easier to integrate with our existing systems. One of the main challenges with VictoriaMetrics is the amount of memory and disk space required by the `vm-storage` units. VictoriaMetrics is designed to be highly efficient in terms of disk space usage, but it still requires a significant amount of memory and disk space to store and index large amounts of data. For example, to store 1 year of data, we currently use 70 `vm-storage` units, each with 32 CPU cores, 128GB of memory, and 4TB of disk space. This is a huge scale, and the cost of maintaining this setup is becoming unsustainable. In addition to the resource usage, there are also issues with redundancy and cost. VictoriaMetrics does not provide built-in support for redundancy or data replication, which means that we have to implement these features manually. This adds complexity and increases the cost of maintaining the system. Given these challenges, we need to find a storage solution that is more scalable, cost-effective, and redundant than VictoriaMetrics. The best candidate for this is Grafana Mimir, which is a Prometheus-based storage system that uses object storage for long-term data retention. Grafana Mimir is part of the Grafana ecosystem, which we already use for monitoring and alerting, so it will be easier to integrate with our existing systems. ## Decision Drivers The decision drivers for replacing VictoriaMetrics with Grafana Mimir for long-term storage are: * Scalability: VictoriaMetrics is no longer able to meet the needs of our rapidly growing scale. Grafana Mimir uses object storage, which is more scalable than the block storage used by VictoriaMetrics. This will enable us to store and analyze large amounts of time-series data more efficiently and cost-effectively. * Cost-effectiveness: The cost of maintaining VictoriaMetrics is becoming unsustainable.Grafana Mimir uses object storage, which is much cheaper than the block storage used by VictoriaMetrics. This will enable us to reduce the overall cost of storing and analyzing time-series data. * Reliability and availability: VictoriaMetrics does not provide built-in support for redundancy or data replication. Grafana Mimir uses object storage and provides built-in support for redundancy and data replication. This will improve the reliability and availability of the storage system, and it will reduce the complexity and cost of maintaining the system. * Integration with existing systems: We already use Grafana for monitoring and alerting, and Grafana Mimir is part of the Grafana ecosystem. This will make it easier to integrate Grafana Mimir with our existing systems and to maintain a consistent monitoring and observability stack. ## Considered Options * VictoriaMetrics: VictoriaMetrics is a fast, scalable, and cost-effective time-series database that uses block storage for data storage. However, it does not have built-in support for redundancy or data replication, which can affect the reliability and availability of the storage system. * Grafana Mimir: Grafana Mimir is a Prometheus-based storage system that uses object storage for data storage. It provides built-in support for redundancy and data replication, which improves the reliability and availability of the storage system. However, it has higher data access latencies than VictoriaMetrics, which can be an issue for applications that require fast access to data. * InfluxDB: InfluxDB is a popular open-source time-series database that has good scalability and reliability. However, it can be more expensive than VictoriaMetrics and Grafana Mimir due to its use of block storage, and it requires more complex maintenance and operations compared to Grafana Mimir. * TimescaleDB: TimescaleDB is an open-source time-series database that is built on top of PostgreSQL. It has good scalability and reliability, and it uses block storage for data storage. However, it can be more expensive than VictoriaMetrics and Grafana Mimir, and it requires more complex maintenance and operations compared to Grafana Mimir. * Cortex: Cortex is an open-source, horizontally scalable, multi-tenant time-series database that is built on top of Prometheus. It uses object storage for data storage, which provides good scalability and cost-effectiveness. However, it does not have built-in support for redundancy or data replication, which can affect the reliability and availability of the storage system, and it requires more complex maintenance and operations compared to Grafana Mimir. ## Decision Outcome After considering the options and conducting performance tests, we have decided to use Grafana Mimir for long-term storage. This decision is based on the following factors: * Grafana Mimir provides better scalability and cost-effectiveness than VictoriaMetrics. We can store more data at a lower cost, and we can easily scale the system as the volume and velocity of data increases. * Grafana Mimir has built-in support for redundancy and data replication. This will improve the reliability and availability of the storage system, and it will reduce the complexity and cost of maintaining the system. * While Grafana Mimir may have higher latencies for data access than VictoriaMetrics, it is still suitable for most use cases in the field of monitoring and observability. In summary, we believe that switching to Grafana Mimir for long-term storage will provide significant benefits in terms of scalability, cost-effectiveness, and reliability. We will implement this solution as soon as possible to improve the performance and reliability of our storage system. ### Proposed Solution The proposed solution is to replace VictoriaMetrics with Grafana Mimir for long-term storage of metrics and time-series data. Grafana Mimir is a Prometheus-based storage system that uses object storage for data retention, and it provides built-in support for redundancy and data replication. This will address the issues with scalability, cost, and redundancy that we are currently experiencing with VictoriaMetrics. ## Architecture ![picture 1](uploads/mimir-v1.png) ## Benefits and Drawbacks The main benefit of using Grafana Mimir for long-term storage is the improved scalability and cost-effectiveness of the system. Grafana Mimir uses object storage, which is much cheaper than the block storage used by VictoriaMetrics. This means that we can store more data at a lower cost, and we can scale the system more easily as the volume and velocity of data increases. Another benefit of using Grafana Mimir is the built-in support for redundancy and data replication. This will improve the reliability and availability of the storage system, and it will reduce the complexity and cost of maintaining the system. One potential drawback of using Grafana Mimir is the higher latencies for data access compared to VictoriaMetrics. Grafana Mimir uses object storage, which has higher latencies for data access than block storage. This may make Grafana Mimir less suitable for applications that require fast access to data, but it is still acceptable for most use cases in the field of monitoring and observability. Overall, the proposed solution of replacing VictoriaMetrics with Grafana Mimir for long-term storage offers significant benefits in terms of scalability, cost-effectiveness, and reliability. While there may be some trade-offs in terms of data access latencies, the overall performance and reliability of the storage system will be improved. This will enable us to store and analyze large amounts of time-series data more efficiently and cost-effectively, and to support our rapidly growing scale. The main drawbacks of choosing Grafana Mimir as our long-term storage solution are: * Limited support for certain features: Grafana Mimir may not support some advanced features in VictoriaMetrics, such as custom retention policies or query functions. We will need to evaluate the compatibility of Grafana Mimir with our existing systems and make any necessary changes or adjustments. * Performance limitations: Grafana Mimir may not be as fast or as efficient as other options, such as InfluxDB or Elasticsearch, in certain scenarios. We will need to monitor the performance of Grafana Mimir in our environment and make any necessary adjustments or optimizations to ensure that it meets our requirements for long-term storage. ### Positive Consequences * Grafana Mimir uses object storage, which is much cheaper than the block storage used by VictoriaMetrics. This means that we can store more data at a lower cost, and we can scale the system more easily as the volume and velocity of data increases. * Grafana Mimir has built-in support for redundancy and data replication. This will improve the reliability and availability of the storage system, and it will reduce the complexity and cost of maintaining the system. ### Negative Consequences * Grafana Mimir uses object storage, which has higher latencies for data access than block storage. This may make Grafana Mimir less suitable for applications that require fast access to data. * Grafana Mimir does not support the MetricsQL language used by Victoria Metrics, which means that some functions that we are currently using may not be available. However, this issue can be solved by using PromQL functions. PromQL is a language supported by Victoria Metrics and also used by Grafana Mimir, which allows us to access and visualize Victoria Metrics data through Mimir.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully