Comments (5)
- lua-resty-sema的效率要比resty-lock高一些,因为前者是luajit ffi在nginx worker内部实现的,不涉及系统调用和io读写,而后者是通过在ngx-shm维护一个key实现锁的,虽然也不涉及系统调用和io读写,但还是要比sema少很多内存的读写的,而且在nginx配置文件中需要额外配置。
- lua-resty-sema有个缺点是只能在worker内生效,而对于跨进程的shdict来说,这个锁并不那么牢靠;之所以选择sema是因为我不想让所有worker都hang在一个锁上,对于缓存中的一致性倒要求没那么高,同时用来防止所有用户请求同时访问redis,造成性能下降;下一步我计划逐步取消缓存,直接将分流策略和运行时信息写在lua table中,缓存在lru cache里,每次在lua空间里进行计算处理
- abtest有两处锁操作,一处是获取运行时信息,一处是获取upstream,锁的出现可以阻止当缓存失效时所有请求都请求redis或者其他后端存储;使用cache可以避免这样的问题,而且是极大避免
from abtestinggateway.
@BG2BKK 非常感谢你的回复,大致了解了,ABTestingGateway 是一个很棒的项目,也期待项目更多的玩法。
from abtestinggateway.
感谢肯定
项目是否很棒,得进一步看实际使用中的情况,我们在努力
from abtestinggateway.
hi,项目中的iprange等策略,根据客户端的ip进行分流,这可能带来一个问题:客户在北京时,分流到A版本的服务,而第二天出差到了B地,可能被分流到了B版本,这可能会给客户带来困惑,一会A版本,一会B版本。 不知道你们是否有考虑过这个问题呢?
from abtestinggateway.
这个问题比较现实,我们考虑的情况是,比如A地是北京联通,而B地是广东联通,我们在服务端获取的是两地联通的出口IP,这样我们获得IP之后,可以将服务分流到就近节点,起到加速的作用;如果没有这样的分流,很可能在B地仍然访问北京的节点,速度回很慢。
一会A版本,一会B版本,这里需要考虑控制灰度版本之间的差异,就要看具体的使用了。
2016-05-14 16:19 GMT+08:00 daoqidelv [email protected]:
hi,项目中的iprange等策略,根据客户端的ip进行分流,这可能带来一个问题:客户在北京时,分流到A版本的服务,而第二天出差到了B地,可能被分流到了B版本,这可能会给客户带来困惑,一会A版本,一会B版本。
不知道你们是否有考虑过这个问题呢?—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#26 (comment)
黄振栋
[email protected]
Phone:15019477872
AD:广东省深圳市西丽大学城哈工大校区C305B
from abtestinggateway.
Related Issues (20)
- 希望能做出集成的docker image HOT 1
- 【时好时坏】uidsuffix,新id第一次访问500,后面再刷新就正常 HOT 1
- 有编好的openresty-1.9.7.5吗? HOT 1
- 有好的交流群吗?有几个源码问题求解 HOT 1
- 如果并发量比较高,redis是否有压力?还有redis挂了的话,分流的使用受影响吗 HOT 3
- 修改了nginx和bate等文件的user为root了,lua文件增加了x权限,在curl时还是报404的错啊?
- 请问怎么调试正在运行的lua代码呢?各位都用的什么工具啊? HOT 2
- 开启编译缓存的情况下,会出现分流错误 HOT 2
- redis
- 这个项目还在维护么? HOT 1
- policy_set和policy_get规则不一致
- stop-all-nginx.sh无法停止abtesting.sh启动的进程?
- 为什么不增加一个基于cookie的分流策略呢?且为什么uid分流要求一定是数字 HOT 1
- bug:多级分流造成的 shdict key 名冲突 HOT 2
- 按照步骤部署完成后,运行
- 是不是已经停止维护了呢?
- How to use password to connect to redis HOT 2
- init_process_timer HOT 1
- 最近想使用这个网关,请问是用master好,还是v2.1好
- 如果要集成redis集群,那这个是否只需要替换redis相关就可以了 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abtestinggateway.