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

Keep track of migrations #8

Closed
thibaultcha opened this issue Jan 30, 2015 · 4 comments
Closed

Keep track of migrations #8

thibaultcha opened this issue Jan 30, 2015 · 4 comments
Assignees

Comments

@thibaultcha
Copy link
Member

In order to have a fully working migrations system, Kong should keep track of the last migration in order to properly revert, or properly go up.

@thibaultcha thibaultcha self-assigned this Jan 30, 2015
@thibaultcha thibaultcha added this to the v0.2 (release) milestone Jan 30, 2015
@ahmadnassri
Copy link
Contributor

one migration at a time (a.k.a in sequence)?

or with migration scripts that can jump versions if needed?

I don't have a preference, i've seen both done and find both to be equally messy.

@thibaultcha thibaultcha mentioned this issue Feb 10, 2015
11 tasks
@thibaultcha
Copy link
Member Author

My idea as an MVP is that up will execute them all, rollback will revert 1 by 1 (in case a migration shouldn't have happened, that's why we need to keep track of them), and reset goes down all the way. Implementing it now.

@subnetmarco
Copy link
Member

As a side note, it would be nice if at least the first migration could be embedded in the kong start command.

@thibaultcha
Copy link
Member Author

Implemented in #45.

gszr pushed a commit that referenced this issue Jun 10, 2021
Problem:
All metrics are recorded by incrementing counters in a shared dictionary.
As the number of metrics increase, so does the contention among Nginx
worker process to increase those counters increases leading to higher
CPU utilization(#2) and potentially will result in a drop in peak RPS.
This also affects the collection phase of metrics where the shared
dictionary needs to be locked for a longer time.

Solution:
Since half of the metrics being recorded are duplicate anyways, those
metrics can be dropped. This doesn't result in any loss functionally
since these metrics can be easily in Prometheus.

From #8
gszr pushed a commit that referenced this issue Jun 10, 2021
gszr pushed a commit that referenced this issue Jun 17, 2021
gszr pushed a commit that referenced this issue Aug 6, 2021
Problem:
All metrics are recorded by incrementing counters in a shared dictionary.
As the number of metrics increase, so does the contention among Nginx
worker process to increase those counters increases leading to higher
CPU utilization(#2) and potentially will result in a drop in peak RPS.
This also affects the collection phase of metrics where the shared
dictionary needs to be locked for a longer time.

Solution:
Since half of the metrics being recorded are duplicate anyways, those
metrics can be dropped. This doesn't result in any loss functionally
since these metrics can be easily in Prometheus.

From #8
gszr pushed a commit that referenced this issue Aug 6, 2021
gszr pushed a commit that referenced this issue Aug 19, 2021
fix(proxy-cache) proxy-cache does not cache ngx.resp
javierguerragiraldez pushed a commit that referenced this issue Sep 3, 2021
* BREAKING: modified hash treatment, must now be an integer > 0

* added a retry counter to fall-through on hashed-retries

* added two convenience hash functions

* some performance improvements (pre-allocated tables for the slot lists)

* removed linter issues (unused variables)
hutchic pushed a commit that referenced this issue Jun 10, 2022
### Summary

Before this commit:

```
patching file LuaJIT-2.1-20190507/src/lj_tab.c
patching file LuaJIT-2.1-20190507/src/lj_asm_arm.h
patching file LuaJIT-2.1-20190507/src/lj_api.c
patching file LuaJIT-2.1-20190507/src/lj_arch.h
patching file LuaJIT-2.1-20190507/src/lj_cconv.c
patching file LuaJIT-2.1-20190507/src/lj_obj.h
patching file LuaJIT-2.1-20190507/src/lj_state.c
patching file lua-resty-core-0.1.17/lib/resty/core/socket_tcp.lua
patching file lua-resty-core-0.1.17/lib/resty/core/socket_tcp.lua
patching file lua-resty-core-0.1.17/lib/resty/core/socket_tcp.lua
patching file lua-resty-core-0.1.17/lib/resty/core/socket_tcp.lua
patching file lua-resty-core-0.1.17/lib/resty/core/socket_tcp.lua
patching file lua-resty-core-0.1.17/lib/resty/core.lua
patching file lua-resty-core-0.1.17/lib/resty/core/socket_tcp.lua
patching file lua-resty-core-0.1.17/lib/ngx/balancer.lua
patching file lua-resty-websocket-0.07/lib/resty/websocket/client.lua
patching file nginx-1.15.8/src/http/ngx_http_upstream.c
Hunk #2 succeeded at 1691 (offset -3 lines).
Hunk #4 succeeded at 1768 (offset -7 lines).
patching file nginx-1.15.8/src/http/ngx_http_special_response.c
patching file nginx-1.15.8/src/stream/ngx_stream_proxy_module.c
Hunk #2 succeeded at 802 (offset 20 lines).
patching file ngx_lua-0.10.15/src/ngx_http_lua_socket_tcp.c
Hunk #5 succeeded at 1556 (offset 48 lines).
Hunk #6 succeeded at 1626 (offset 48 lines).
Hunk #7 succeeded at 1726 (offset 48 lines).
Hunk #8 succeeded at 1749 (offset 48 lines).
Hunk #9 succeeded at 1760 (offset 48 lines).
Hunk #10 succeeded at 1775 (offset 48 lines).
Hunk #11 succeeded at 1816 (offset 48 lines).
Hunk #12 succeeded at 1827 (offset 48 lines).
Hunk #13 succeeded at 1849 (offset 48 lines).
Hunk #14 succeeded at 1868 (offset 48 lines).
Hunk #15 succeeded at 1878 (offset 48 lines).
Hunk #16 succeeded at 2008 (offset 48 lines).
Hunk #17 succeeded at 6101 (offset 62 lines).
patching file ngx_lua-0.10.15/src/ngx_http_lua_socket_tcp.h
patching file ngx_lua-0.10.15/src/ngx_http_lua_socket_tcp.c
Hunk #1 succeeded at 1647 (offset 48 lines).
patching file ngx_lua-0.10.15/src/ngx_http_lua_socket_tcp.c
Hunk #3 succeeded at 1579 (offset 48 lines).
Hunk #4 succeeded at 1644 (offset 48 lines).
Hunk #5 succeeded at 1668 (offset 48 lines).
patching file ngx_lua-0.10.15/src/ngx_http_lua_socket_tcp.c
Hunk #1 succeeded at 1756 (offset 48 lines).
patching file ngx_lua-0.10.15/src/ngx_http_lua_balancer.c
patching file ngx_lua-0.10.15/src/ngx_http_lua_common.h
patching file ngx_lua-0.10.15/src/ngx_http_lua_module.c
patching file ngx_lua-0.10.15/src/ngx_http_lua_string.c
patching file ngx_stream_lua-0.0.7/src/ngx_stream_lua_control.c
patching file ngx_stream_lua-0.0.7/src/ngx_stream_lua_variable.c
patching file ngx_stream_lua-0.0.7/src/ngx_stream_lua_common.h
patching file ngx_stream_lua-0.0.7/src/ngx_stream_lua_util.c
patching file ngx_stream_lua-0.0.7/src/api/ngx_stream_lua_api.h
```

vs. (after this commit)

```
patching file LuaJIT-2.1-20190507/src/lj_tab.c
patching file LuaJIT-2.1-20190507/src/lj_asm_arm.h
patching file LuaJIT-2.1-20190507/src/lj_api.c
patching file LuaJIT-2.1-20190507/src/lj_arch.h
patching file LuaJIT-2.1-20190507/src/lj_cconv.c
patching file LuaJIT-2.1-20190507/src/lj_obj.h
patching file LuaJIT-2.1-20190507/src/lj_state.c
patching file lua-resty-core-0.1.17/lib/resty/core/socket_tcp.lua
patching file lua-resty-core-0.1.17/lib/resty/core/socket_tcp.lua
patching file lua-resty-core-0.1.17/lib/resty/core/socket_tcp.lua
patching file lua-resty-core-0.1.17/lib/resty/core/socket_tcp.lua
patching file lua-resty-core-0.1.17/lib/resty/core/socket_tcp.lua
patching file lua-resty-core-0.1.17/lib/resty/core.lua
patching file lua-resty-core-0.1.17/lib/resty/core/socket_tcp.lua
patching file lua-resty-core-0.1.17/lib/ngx/balancer.lua
patching file lua-resty-websocket-0.07/lib/resty/websocket/client.lua
patching file nginx-1.15.8/src/http/ngx_http_upstream.c
patching file nginx-1.15.8/src/http/ngx_http_special_response.c
patching file nginx-1.15.8/src/stream/ngx_stream_proxy_module.c
patching file ngx_lua-0.10.15/src/ngx_http_lua_socket_tcp.c
patching file ngx_lua-0.10.15/src/ngx_http_lua_socket_tcp.h
patching file ngx_lua-0.10.15/src/ngx_http_lua_socket_tcp.c
patching file ngx_lua-0.10.15/src/ngx_http_lua_socket_tcp.c
patching file ngx_lua-0.10.15/src/ngx_http_lua_socket_tcp.c
patching file ngx_lua-0.10.15/src/ngx_http_lua_balancer.c
patching file ngx_lua-0.10.15/src/ngx_http_lua_common.h
patching file ngx_lua-0.10.15/src/ngx_http_lua_module.c
patching file ngx_lua-0.10.15/src/ngx_http_lua_string.c
patching file ngx_stream_lua-0.0.7/src/ngx_stream_lua_control.c
patching file ngx_stream_lua-0.0.7/src/ngx_stream_lua_variable.c
patching file ngx_stream_lua-0.0.7/src/ngx_stream_lua_common.h
patching file ngx_stream_lua-0.0.7/src/ngx_stream_lua_util.c
patching file ngx_stream_lua-0.0.7/src/api/ngx_stream_lua_api.h
```
bungle added a commit that referenced this issue Jan 19, 2023
# Summary

- chore(tests): pin third party actions to sha by @ADD-SP in #5
- fix(loop) dynamically sets log level for timers if needed (KAG-326) by @gruceo in #7
- fix: too many scaling logs by @ADD-SP in #6
- chore(rockspec) release 0.2.1 by @gruceo in #8

Full Changelog: Kong/lua-resty-timer-ng@0.2.0...0.2.1
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

3 participants