-
Notifications
You must be signed in to change notification settings - Fork 845
register stats in traffic_server if running in standalone mode #3693
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
Conversation
zwoop
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the right way to do this honestly. I think we should register this setting where this feature gets initialized. Yes, there are some proxy.node metrics in RecordsConfig.cc already, but that really wasn't the way this was supposed to be done afaik.
zwoop
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, we have this:
cmd/traffic_manager/traffic_manager.cc: RecRegisterStatInt(RECT_NODE, "proxy.node.config.draining", 0, RECP_NON_PERSISTENT);
So if this is not sufficient, we should fix the above. Or at a minimum the above should be removed (we shouldn't register the metric twice).
|
@maskit something odd is going on here, can you take a look please? |
|
The metric was originally just a variable but the variable was replaced with the setting on #2962, which means it worked without traffic_manager but now it requires traffic_manager (traffic_manager has to register the setting first on startup). Can we register all the 6 settings on traffic_server side, or do these need to be registered on traffic_manager side? Only moving the one for draining doesn't make sense. Also, we should be able to remove "proxy.node.config.restart_required.cop", right? |
|
[approve ci autest] |
3959755 to
1959697
Compare
|
[approve ci autest] |
Saw this causes autest failed. @zwoop @dragon512 any insights? |
|
I'm OK with this. However, I'd rather register all the metrics consistently on traffic_server side on startup if traffic_server wasn't managed by traffic_manager. I'm not sure why autest is failing but the diff is really confusing. It looks like 'keep-alive' vs 'Keep-Alive' but they are a request header and a response header. |
|
@maskit I looked into other stats registered in traffic_manager. They can only be changed via traffic_ctl and traffic_manager. Wouldn't make much sense to register them in traffic_server. This stat is different. It can be also changed by the signal. |
1959697 to
ad3a5e4
Compare
Right, that's true as far as I know.
I think differently. I see the stats as interfaces of traffic_server for other processes that manages traffic_server. If we registered them in traffic_server, we would be able to manage traffic_server with different tools, such as unit tests and homemade management tools. Also, this is probably the only point that traffic_server depends on traffic_manager. So if we could make traffic_server their owner the relationship between traffic_server and traffic_manager would be a bit simple, though I don't think it has to be done on this PR because it wouldn't be a small change and I'm not sure whether this is really possible. |
|
@SolidWallOfCode @vmamidi I heard you guys are working on around traffic_manager and RPC. What do you think about this from your point of view? |
|
I agree with @maskit. I think it's a good idea to make |
|
@SolidWallOfCode @maskit Thanks for the suggestions! I'll make the change accordingly. |
ad3a5e4 to
20187ff
Compare
20187ff to
04fc4dd
Compare
maskit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
We could remove them from traffic_manager but I don't think that need to be done on this PR. This fix is the minimal and simplest fix for the draining issue.
Without this the
RecSetRecordInt("proxy.node.config.draining", 1, REC_SOURCE_DEFAULT);on Main.cc:288 will fail,because
from P_RecCore.cc:422.
This bug is breaking the drain feature and it's needed for #2918.