Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

并发能力提升讨论 #59

Open
Petelin opened this issue May 7, 2020 · 0 comments
Open

并发能力提升讨论 #59

Petelin opened this issue May 7, 2020 · 0 comments

Comments

@Petelin
Copy link
Owner

Petelin commented May 7, 2020

并发能力提升讨论

  1. 拆分,横向扩容

  2. 直接使用有状态服务,解决分布锁的问题,提升IO能力

  3. 锁的范围越小越好

  4. 锁的持续时间越短越好,通过异步化,提前加载资源,�乐观锁来解决

  5. pprof , heap, alloc

  6. Make map 1000 要 0.2ms, insert copy 要 0.2ms

  7. Create 1000 slice 要 0.2ns, 在栈上分配。 如果在堆上分配要 120ns

  8. 优先级锁,请求是按需进来的,然后想让最先进来的最先完成, 也就是说当他在来抢锁的时候要让他最先拿到锁。

  9. COW, 对于多个对象的管理,只在修改对象的时候才deepcopy

  10. 内存数据库, 隔离性,原子性

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant