<?xml version="1.0" encoding="UTF-8"?>
<article article-type="research-article" dtd-version="1.3" xml:lang="ru" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://metafora.rcsi.science/xsd_files/journal3.xsd">
  <front>
    <journal-meta>
      <journal-id journal-id-type="publisher-id">moitvivt</journal-id>
      <journal-title-group>
        <journal-title xml:lang="ru">Моделирование, оптимизация и информационные технологии</journal-title>
        <trans-title-group xml:lang="en">
          <trans-title>Modeling, Optimization and Information Technology</trans-title>
        </trans-title-group>
      </journal-title-group>
      <issn pub-type="epub">2310-6018</issn>
      <publisher>
        <publisher-name>Издательство</publisher-name>
      </publisher>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.26102/2310-6018/2025.48.1.013</article-id>
      <article-id pub-id-type="custom" custom-type="elpub">1803</article-id>
      <title-group>
        <article-title xml:lang="ru">Разработка методов ограничения запросов к API в зависимости от классов потребителей</article-title>
        <trans-title-group xml:lang="en">
          <trans-title>Development of API rate limiting methods based on consumer classes</trans-title>
        </trans-title-group>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <contrib-id contrib-id-type="orcid">0009-0006-0036-5976</contrib-id>
          <name-alternatives>
            <name name-style="eastern" xml:lang="ru">
              <surname>Селезнёв</surname>
              <given-names>Роман Михайлович</given-names>
            </name>
            <name name-style="western" xml:lang="en">
              <surname>Seleznev</surname>
              <given-names>Roman Mikhailovich</given-names>
            </name>
          </name-alternatives>
          <email>r.m.seleznev@gmail.com</email>
          <xref ref-type="aff">aff-1</xref>
        </contrib>
      </contrib-group>
      <aff-alternatives id="aff-1">
        <aff xml:lang="ru">Новосибирский Государственный Технический Университет</aff>
        <aff xml:lang="en">Novosibirsk State Technical University</aff>
      </aff-alternatives>
      <pub-date pub-type="epub">
        <day>01</day>
        <month>01</month>
        <year>2026</year>
      </pub-date>
      <volume>1</volume>
      <issue>1</issue>
      <elocation-id>10.26102/2310-6018/2025.48.1.013</elocation-id>
      <permissions>
        <copyright-statement>Copyright © Авторы, 2026</copyright-statement>
        <copyright-year>2026</copyright-year>
        <license license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/">
          <license-p>This work is licensed under a Creative Commons Attribution 4.0 International License</license-p>
        </license>
      </permissions>
      <self-uri xlink:href="https://moitvivt.ru/ru/journal/article?id=1803"/>
      <abstract xml:lang="ru">
        <p>Ограничение запросов является важной частью управления доступностью и надежностью API. На сегодняшний день существует ряд подходов к реализации механизма ограничения запросов, каждый из которых основывается на определенном алгоритме или их комбинации. Однако существующие подходы зачастую рассматривают всех потребителей как однородную группу, что препятствует созданию гибких стратегий управления ресурсами в условиях современных распределенных архитектур. В данной статье автором предложены два новых метода ограничения запросов, основанные на алгоритме маркерной корзины. Первый метод предусматривает использование общей маркерной корзины с различными требованиями к минимальному уровню ее заполнения в зависимости от класса потребителей. Второй метод предполагает использование для каждого класса потребителей отдельных маркерных корзин со своими значениями параметров, но общим лимитом. Проведенное моделирование подтвердило, что оба метода позволяют обеспечить эффективное ограничение запросов к API, при этом были выявлены различия между методами в характере распределения ресурсов среди разных классов потребителей. Полученные результаты представляют практическую ценность для разработчиков информационных систем и сервисов, которым необходимо поддерживать высокий уровень доступности, одновременно обеспечивая гарантии доступа для разных категорий потребителей.</p>
      </abstract>
      <trans-abstract xml:lang="en">
        <p>Rate limiting is a crucial aspect of managing the availability and reliability of APIs. Today, there are several approaches to implementing rate limiting mechanisms, each based on specific algorithms or their combinations. However, existing methods often treat all consumers as a homogeneous group, hindering the creation of flexible resource management strategies in modern distributed architectures. In this article, the author proposes two new methods for rate limiting based on the token bucket algorithm. The first method involves using a shared token bucket with different minimum fill requirements depending on the consumer class. The second method suggests using separate token buckets for each consumer class with individual parameter values but a common limit. Simulation results confirmed that both methods enable efficient API request limitation, though disparities emerged regarding resource distribution patterns across diverse consumer classes. These findings have practical implications for developers of information systems and services who need to maintain high availability while ensuring access guarantees for various consumer categories.</p>
      </trans-abstract>
      <kwd-group xml:lang="ru">
        <kwd>ограничение запросов</kwd>
        <kwd>алгоритм маркерной корзины</kwd>
        <kwd>программный интерфейс</kwd>
        <kwd>класс потребителя</kwd>
        <kwd>квота</kwd>
        <kwd>порог</kwd>
        <kwd>всплеск трафика</kwd>
      </kwd-group>
      <kwd-group xml:lang="en">
        <kwd>rate limiting</kwd>
        <kwd>token bucket algorithm</kwd>
        <kwd>software interface</kwd>
        <kwd>consumer class</kwd>
        <kwd>quota</kwd>
        <kwd>threshold</kwd>
        <kwd>burst traffic</kwd>
      </kwd-group>
      <funding-group>
        <funding-statement xml:lang="ru">Исследование выполнено без спонсорской поддержки.</funding-statement>
        <funding-statement xml:lang="en">The study was performed without external funding.</funding-statement>
      </funding-group>
    </article-meta>
  </front>
  <back>
    <ref-list>
      <title>References</title>
      <ref id="cit1">
        <label>1</label>
        <mixed-citation xml:lang="ru">Firmani D., Leotta F., Mecella M. On Computing Throttling Rate Limits in Web APIs through Statistical Inference. In: 2019 IEEE International Conference on Web Services (ICWS), 08–13 July 2019, Milan, Italy. IEEE; 2019. pp. 418–425. https://doi.org/10.1109/ICWS.2019.00075</mixed-citation>
      </ref>
      <ref id="cit2">
        <label>2</label>
        <mixed-citation xml:lang="ru">Alharbi S.J., Moulahi T. API Security Testing: The Challenges of Security Testing for Restful APIs. International Journal of Innovative Science and Research Technology. 2023;8(5):1485–1499. https://doi.org/10.5281/zenodo.7988410</mixed-citation>
      </ref>
      <ref id="cit3">
        <label>3</label>
        <mixed-citation xml:lang="ru">Serbout S., Malki A.E., Pautasso C., Zdun U. API Rate Limit Adoption – A pattern collection. In: EuroPLoP '23: Proceedings of the 28th European Conference on Pattern Languages of Programs, 05–09 July 2023, Irsee, Germany. New York: Association for Computing Machinery; 2024. https://doi.org/10.1145/3628034.3628039</mixed-citation>
      </ref>
      <ref id="cit4">
        <label>4</label>
        <mixed-citation xml:lang="ru">Wanda P., Hiswati M.E. Belief-DDoS: stepping up DDoS attack detection model using DBN algorithm. International Journal of Information Technology. 2024;16(1):271–278. https://doi.org/10.1007/s41870-023-01631-x</mixed-citation>
      </ref>
      <ref id="cit5">
        <label>5</label>
        <mixed-citation xml:lang="ru">Padma Latha V.L., Sudhakar Reddy N., Suresh Babu A. On optimizing scalability and availability of cloud based software services using scale rate limiting algorithm. International Journal of Nonlinear Analysis and Applications. 2022;13(2):1893–1905. https://doi.org/10.22075/ijnaa.2022.27403.3588</mixed-citation>
      </ref>
      <ref id="cit6">
        <label>6</label>
        <mixed-citation xml:lang="ru">Park J., Park J., Jung Y., Lim H., Yeo H., Han D. TopFull: An Adaptive Top-Down Overload Control for SLO-Oriented Microservices. In: ACM SIGCOMM '24: Proceedings of the ACM SIGCOMM 2024 Conference, 04–08 August, 2024, Sydney, Australia. New York: Association for Computing Machinery; 2024. pp. 876–890. https://doi.org/10.1145/3651890.3672253</mixed-citation>
      </ref>
      <ref id="cit7">
        <label>7</label>
        <mixed-citation xml:lang="ru">Zhou H., Chen M., Lin Q., Wang Y., She X., Liu S., Gu R., Ooi B.C., Yang J. Overload Control for Scaling WeChat Microservices. In: SoCC '18: Proceedings of the ACM Symposium on Cloud Computing, 11–13 October 2018, Carlsbad, USA. New York: Association for Computing Machinery; 2018. pp. 149–161. https://doi.org/10.1145/3267809.3267823</mixed-citation>
      </ref>
      <ref id="cit8">
        <label>8</label>
        <mixed-citation xml:lang="ru">El Malki A., Zdun U., Pautasso C. Impact of API Rate Limit on Reliability of Microservices-Based Architectures. In: 2022 IEEE International Conference on Service-Oriented System Engineering (SOSE), 15–18 August 2022, Newark, USA. IEEE; 2022. pp. 19–28. https://doi.org/10.1109/SOSE55356.2022.00009</mixed-citation>
      </ref>
      <ref id="cit9">
        <label>9</label>
        <mixed-citation xml:lang="ru">Сюй А. System Design. Подготовка к сложному интервью. Санкт-Петербург: Питер; 2024. 304 с.</mixed-citation>
      </ref>
      <ref id="cit10">
        <label>10</label>
        <mixed-citation xml:lang="ru">Bass L., Clements P., Kazman R. Software Architecture in Practice. 4th Edition. Boston: Addison-Wesley Professional; 2021. 464 p.</mixed-citation>
      </ref>
      <ref id="cit11">
        <label>11</label>
        <mixed-citation xml:lang="ru">Barnhart B., Brooker M., Chinenkov D., Hooper T., Im J., Jha P.C., Kraska T., Kurakula A., Kuznetsov A., McAlister G., Muthukrishnan A., Narayanan A., Terry D., Urgaonkar B., Yan J. Resource Management in Aurora Serverless. Proceedings of the VLDB Endowment. 2024;17(12):4038–4050. https://doi.org/10.14778/3685800.3685825</mixed-citation>
      </ref>
      <ref id="cit12">
        <label>12</label>
        <mixed-citation xml:lang="ru">Kaldor J., Mace J., Bejda M., Gao E., Kuropatwa W., O’Neill J., Ong K.W., Schaller B., Shan P., Viscomi B., Venkataraman V., Veeraraghavan K., Song Y.J. Canopy: An End-to-End Performance Tracing and Analysis System. In: SOSP '17: Proceedings of the 26th Symposium on Operating Systems Principles, 28 October 2017, Shanghai, China. New York: Association for Computing Machinery; 2017. pp. 34–50. https://doi.org/10.1145/3132747.3132749</mixed-citation>
      </ref>
      <ref id="cit13">
        <label>13</label>
        <mixed-citation xml:lang="ru">Lin Y.-W., Lin T.-X., Farn C.-K. The Free-of-Charge Phenomena in the Network Economy – A Multi-Party Value Exchange Model. Journal of Theoretical and Applied Electronic Commerce Research. 2021;16(7):2981–3002. https://doi.org/10.3390/jtaer16070163</mixed-citation>
      </ref>
    </ref-list>
    <fn-group>
      <fn fn-type="conflict">
        <p>The authors declare that there are no conflicts of interest present.</p>
      </fn>
    </fn-group>
  </back>
</article>