Hi everyone,

I work as a part of Traffic team at LinkedIn. Our team has a use case where
we want to reload ‘remap.config’ without restarting trafficserver. I
understand that I can use ‘traffic_ctl config reload’ command for the same,
but we don’t want dependence on an external process to run traffic_ctl.

In order to achieve this I submitted this pull request
<https://github.com/apache/trafficserver/pull/1815/files> last week, in
which I introduced a new API function 'TSRemapConfigReload()' which can
reload remap.config. The way we are using it is that we have a thread
(running as a part of plugin) which keeps on polling a git mirror at
regular interval. Once it identifies that there is a change in remap.config
file in that git mirror, it pulls the new file and replaces the the old
config file with the new one on disk (with creating a backup of the
previous one). After doing that it calls TSRemapConfigReload() to reload
the new remap.config.

The corresponding pull request for this was not accepted as James pointed
out that plugin is not the correct place to do it. As an alternative he
suggested that we can use ‘TSReconfigure()’ which is part of ‘mgmtapi.h’.
The problem with that is, the functions as a part of management API are not
available inside plugins.

I am starting this thread to discuss the correct way to solve this problem.

Regards,
Nishant

Reply via email to