Skip to content
Snippets Groups Projects
  1. Nov 11, 2021
  2. Oct 04, 2021
    • meskio's avatar
      Use tpo geoip library · 4396d505
      meskio authored
      Now the geoip implmentation has being moved to it's own library to be
      shared between projects.
      4396d505
  3. Aug 05, 2021
  4. Jul 19, 2021
  5. Jul 08, 2021
  6. Jul 07, 2021
    • meskio's avatar
      Make the proxy to report the number of clients to the broker · 7a1857c4
      meskio authored
      So the assignment of proxies is based on the load. The number of clients
      is ronded down to 8. Existing proxies that doesn't report the number
      of clients will be distributed equaly to new proxies until they get 8
      clients, that is okish as the existing proxies do have a maximum
      capacity of 10.
      
      Fixes #40048
      7a1857c4
  7. Jun 02, 2021
    • Cecylia Bocovich's avatar
      Encode client-broker messages as json in HTTP body · 270eb218
      Cecylia Bocovich authored
      Send the client poll request and response in a json-encoded format in
      the HTTP request body rather than sending the data in HTTP headers. This
      will pave the way for using domain-fronting alternatives for the
      Snowflake rendezvous.
      270eb218
  8. May 20, 2021
    • Arlo Breault's avatar
      Remove sync.Once from around logMetrics · 7ef49272
      Arlo Breault authored
      Follow up to 160ae2dd
      
      Analysis by @dcf,
      
      > I don't think the sync.Once around logMetrics is necessary anymore.
      Its original purpose was to inhibit logging on later file handles of
      metrics.log, if there were more than one opened. See 171c55a9 and #29734
      (comment 2593039) "Making a singleton *Metrics variable causes problems
      with how Convey does tests. It shouldn't be called more than once, but
      for now I'm using sync.Once on the logging at least so it's explicit."
      Commit ba4fe1a7 changed it so that metrics.log is opened in main, used
      to create a *log.Logger, and that same instance of *log.Logger is passed
      to both NewMetrics and NewBrokerContext. It's safe to share the same
      *log.Logger across multiple BrokerContext.
      7ef49272
  9. May 19, 2021
    • Arlo Breault's avatar
      Make promMetrics not a global · 160ae2dd
      Arlo Breault authored
      Doesn't seem like it needs to exist outside of the metrics struct.
      
      Also, the call to logMetrics is moved to the constructor.  A metrics
      instance is only created when a BrokerContext is created, which only
      happens at startup.  The sync of only doing that once is left for
      documentation purposes, since it doesn't hurt, but also seems redundant.
      160ae2dd
  10. Apr 26, 2021
  11. Apr 22, 2021
  12. Jan 25, 2021
  13. Nov 27, 2020
  14. Aug 24, 2020
    • Cecylia Bocovich's avatar
      Update broker stats to include info on NAT types · 3c331750
      Cecylia Bocovich authored
      As we now partition proxies by NAT type, our stats are more useful if they
      capture how many proxies of each type we have, and information on
      whether we have enough proxies of the right NAT type for our clients.
      This change adds proxy counts by NAT type and binned counts of denied clients by NAT type.
      3c331750
  15. Jul 06, 2020
  16. Mar 25, 2020
  17. Dec 05, 2019
    • Cecylia Bocovich's avatar
      Added another lock to protect broker stats · 06298eec
      Cecylia Bocovich authored
      Added another lock to the metrics struct to synchronize accesses to the
      broker stats. There's a possible race condition if stats are updated at
      the same time they are being logged.
      06298eec
    • Cecylia Bocovich's avatar
      Add tests to check for data race in broker · 42e16021
      Cecylia Bocovich authored
      We had some data races in the broker that occur when proxies and clients
      modify the heap/snowflake map at the same time. This test has a client
      and proxy access the broker simultaneously to check for data races.
      42e16021
    • Cecylia Bocovich's avatar
      Add synchronization to prevent race in broker · dccc15a6
      Cecylia Bocovich authored
      There's a race condition in the broker where both the proxy and the
      client processes try to pop/remove the same snowflake from the heap.
      This patch adds synchronization to prevent simultaneous accesses to
      snowflakes.
      dccc15a6
  18. Nov 28, 2019
  19. Nov 13, 2019
    • Cecylia Bocovich's avatar
      Remove unnecessary logging at broker · 7557e96a
      Cecylia Bocovich authored
      7557e96a
    • Cecylia Bocovich's avatar
      Redo protocol for proxy--broker messages · c4ae6490
      Cecylia Bocovich authored
      Switch to containing all communication between the proxy and the broker
      in the HTTP response body. This will make things easier if we ever use
      something other than HTTP communicate between different actors in the
      snowflake system.
      
      Other changes to the protocol are as follows:
      - requests are accompanied by a version number so the broker can be
      backwards compatable if desired in the future
      - all responses are 200 OK unless the request was badly formatted
      c4ae6490
  20. Oct 08, 2019
  21. Sep 19, 2019
    • Cecylia Bocovich's avatar
      Removed extraneous log messages · f3be34a4
      Cecylia Bocovich authored
      Many of our log messages were being used to generate metrics, but are
      now being aggregated and logged to a separate metrics log file and so we
      don't need them in the regular logs anymore.
      
      This addresses the goal of ticket #30830, to remove unecessary messages
      and keep broker logs for debugging purposes.
      f3be34a4
  22. Aug 27, 2019
    • Cecylia Bocovich's avatar
      Modified broker /debug page to display counts only · 00eb4aad
      Cecylia Bocovich authored
      The broker /debug page was displaying proxy IDs and roundtrip times. As
      serna pointed out in bug #31460, the proxy IDs can be used to launch a
      denial of service attack. As the metrics team pointed out on #21315, the
      round trip time average can be potentially sensitive.
      
      This change displays only proxy counts and uses ID lengths to
      distinguish between standalone proxy-go instances and browser-based
      snowflake proxies.
      00eb4aad
  23. Aug 16, 2019
  24. Jun 25, 2019
Loading