提供三種單機(jī)限速的方案体捏,未經(jīng)線上大量驗(yàn)證方法1贴铜,guava的RateLimitor方法2:guava的loadCache方法3:定時(shí)任務(wù)加原子變量github: https://github.com/lebron374/RateLimiterDemo