<commit_before>apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-configmap
data:
  default: |
    user nginx;
    worker_processes  3;
    events {
      worker_connections  5120;
    }
    http {
      server {
          listen       80;
          server_name  _;
          location /nginx_health {
            access_log off;
            return 200 "healthy\n";
          }
      }

      map $http_x_edge_proto $scheme_from_fastly {
        "" $scheme;
        default $http_x_edge_proto;
      }

      limit_req_status 429;
      limit_req_zone  $binary_remote_addr  zone=abusers:10m  rate=40r/s;
      limit_req_zone  $binary_remote_addr  zone=dependencyapi:10m  rate=100r/s;
      limit_req_zone  $binary_remote_addr  zone=minutely:10m  rate=100r/m;

      proxy_cache_path  /var/lib/nginx/cache  levels=1:2 keys_zone=cache-versions:10m inactive=24h  max_size=100m;

      include /etc/nginx/conf.d/logging.conf;
      include /etc/nginx/sites-enabled/*;
    }
  rubygems: |
    server {
        listen       8080;
        server_name _;

        real_ip_recursive on;

        # Fastly
        set_real_ip_from '172.16.31.10/24';
        set_real_ip_from '172.16.17.32/23';
        set_real_ip_from '192.168.3.11/24';
        set_real_ip_from '172.16.31.10/20';
        set_real_ip_from '172.16.31.10/16';
        set_real_ip_from '172.16.58.3/18';<commit_msg>Reduce abusers rate limit to 30 rps<commit_after>apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-configmap
data:
  default: |
    user nginx;
    worker_processes  3;
    events {
      worker_connections  5120;
    }
    http {
      server {
          listen       80;
          server_name  _;
          location /nginx_health {
            access_log off;
            return 200 "healthy\n";
          }
      }

      map $http_x_edge_proto $scheme_from_fastly {
        "" $scheme;
        default $http_x_edge_proto;
      }

      limit_req_status 429;
      limit_req_zone  $binary_remote_addr  zone=abusers:10m  rate=30r/s;
      limit_req_zone  $binary_remote_addr  zone=dependencyapi:10m  rate=100r/s;
      limit_req_zone  $binary_remote_addr  zone=minutely:10m  rate=100r/m;

      proxy_cache_path  /var/lib/nginx/cache  levels=1:2 keys_zone=cache-versions:10m inactive=24h  max_size=100m;

      include /etc/nginx/conf.d/logging.conf;
      include /etc/nginx/sites-enabled/*;
    }
  rubygems: |
    server {
        listen       8080;
        server_name _;

        real_ip_recursive on;

        # Fastly
        set_real_ip_from '172.16.31.10/24';
        set_real_ip_from '172.16.17.32/23';
        set_real_ip_from '192.168.3.11/24';
        set_real_ip_from '172.16.31.10/20';
        set_real_ip_from '172.16.31.10/16';
        set_real_ip_from '172.16.58.3/18';
{'fraction_non_alphanumeric': 0.0968208092485549, 'fraction_numerical': 0.0773121387283237, 'mean_word_length': 2.128813559322034, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 12, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '234905', 'n_tokens_mistral': 1158, 'n_tokens_neox': 1005, 'n_words': 161}