hello. This is jay and it’s been 2 weeks since I started to work on
traffic server.

I’m working on a throttling plugin. can I assign the plugin to a specific
domain like remap plugin?

For example, a throttle plugin serves www.exampleA.com and another plugin
serves www.exampleB.com.

A throttling plugin originated from null-transform plugin works well. i
tried to implement a throttling in remap plugin but it doesn’t work.

I traced log files and there was a difference in ending. 

The ending of normal throttling plugin log file is…

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[Jun  6 11:30:26.318] Server {47016656885504} DEBUG: (http) [32]
[&HttpSM::tunnel_handler_transform_read, VC_EVENT_EOS]
[Jun  6 11:30:26.318] Server {47016656885504} DEBUG: (http_tunnel) [32]
consumer_handler [cache write t VC_EVENT_WRITE_COMPLETE]
[Jun  6 11:30:26.318] Server {47016656885504} DEBUG: (http) [32]
[&HttpSM::tunnel_handler_cache_write, VC_EVENT_WRITE_COMPLETE]
[Jun  6 11:30:26.318] Server {47016656885504} DIAG: (h264-transform) final
bitrate = [1426801]
[Jun  6 11:30:26.319] Server {47016657938176} DEBUG: (http_tunnel) [32]
consumer_handler [user agent VC_EVENT_WRITE_COMPLETE]
[Jun  6 11:30:26.319] Server {47016657938176} DEBUG: (http) [32]
[&HttpSM::tunnel_handler_ua, VC_EVENT_WRITE_COMPLETE]
[Jun  6 11:30:26.319] Server {47016657938176} DEBUG: (http_cs) [32] session
closed
[Jun  6 11:30:26.319] Server {47016657938176} DEBUG: (http_cs) [32] session
destroy
[Jun  6 11:30:26.319] Server {47016657938176} DEBUG: (http) [32]
[HttpSM::main_handler, HTTP_TUNNEL_EVENT_DONE]
[Jun  6 11:30:26.319] Server {47016657938176} DEBUG: (http) [32]
[&HttpSM::tunnel_handler, HTTP_TUNNEL_EVENT_DONE]
[Jun  6 11:30:26.319] Server {47016657938176} DEBUG: (http_redirect)
[HttpTunnel::deallocate_postdata_copy_buffers]
[Jun  6 11:30:26.319] Server {47016657938176} DEBUG: (http) [32] calling
plugin on hook TS_HTTP_TXN_CLOSE_HOOK at hook 0x1CDB260
[Jun  6 11:30:26.327] Server {47016657938176} DEBUG: (http) [32]
[&HttpSM::state_api_callback, HTTP_API_CONTINUE]
[Jun  6 11:30:26.327] Server {47016657938176} DEBUG: (http) [32]
[&HttpSM::state_api_callout, HTTP_API_CONTINUE]
[Jun  6 11:30:26.327] Server {47016657938176} DEBUG: (http_seq)
[HttpStateMachineGet::update_stats] Logging transaction
[Jun  6 11:30:26.327] Server {47016657938176} DEBUG: (http) [32]
dellocating sm
----------------------------------------------------------------------------
----------

I put the codes of throttling plugin into remap plugin but throttling in
remap plugin ends like this.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[Jun  7 17:47:58.313] Server {48011842122016} DEBUG: (http_tunnel) [2]
producer_handler [transform read VC_EVENT_EOS]
[Jun  7 17:47:58.313] Server {48011842122016} DEBUG: (http_redirect)
[HttpTunnel::producer_handler] enable_redirection: [1 0 0] event: 104
[Jun  7 17:47:58.313] Server {48011842122016} DEBUG: (http) [2]
[&HttpSM::tunnel_handler_transform_read, VC_EVENT_EOS]
[Jun  7 17:47:58.313] Server {48011842122016} DEBUG: (http_tunnel) [2]
consumer_handler [cache write t VC_EVENT_WRITE_COMPLETE]
[Jun  7 17:47:58.313] Server {48011842122016} DEBUG: (http) [2]
[&HttpSM::tunnel_handler_cache_write, VC_EVENT_WRITE_COMPLETE]
[Jun  7 17:47:58.314] Server {48011850979072} DEBUG: (http_tunnel) [2]
consumer_handler [user agent VC_EVENT_WRITE_READY]
[Jun  7 17:47:58.314] Server {48011850979072} DEBUG: (http_tunnel) [2]
consumer_handler [user agent VC_EVENT_WRITE_READY]
[Jun  7 17:47:58.314] Server {48011850979072} DEBUG: (http_tunnel) [2]
consumer_handler [user agent VC_EVENT_WRITE_COMPLETE]
[Jun  7 17:47:58.314] Server {48011850979072} DEBUG: (http) [2]
[&HttpSM::tunnel_handler_ua, VC_EVENT_WRITE_COMPLETE]
[Jun  7 17:47:58.314] Server {48011850979072} DEBUG: (http_cs) [2] session
released by sm [2]         <------------------ where is session closed?
[Jun  7 17:47:58.314] Server {48011850979072} DEBUG: (http_cs) [2]
initiating io for next header
[Jun  7 17:47:58.314] Server {48011850979072} DEBUG: (http) [2]
[HttpSM::main_handler, HTTP_TUNNEL_EVENT_DONE]
[Jun  7 17:47:58.314] Server {48011850979072} DEBUG: (http) [2]
[&HttpSM::tunnel_handler, HTTP_TUNNEL_EVENT_DONE]
[Jun  7 17:47:58.314] Server {48011850979072} DEBUG: (http_redirect)
[HttpTunnel::deallocate_postdata_copy_buffers]
[Jun  7 17:47:58.314] Server {48011850979072} DEBUG: (http) [2] calling
plugin on hook TS_HTTP_TXN_CLOSE_HOOK at hook 0xA4CDD2E0
[Jun  7 17:47:58.324] Server {48011850979072} DEBUG: (http) [2]
[&HttpSM::state_api_callback, HTTP_API_CONTINUE]
[Jun  7 17:47:58.324] Server {48011850979072} DEBUG: (http) [2]
[&HttpSM::state_api_callout, HTTP_API_CONTINUE]
[Jun  7 17:47:58.324] Server {48011850979072} DEBUG: (http_seq)
[HttpStateMachineGet::update_stats] Logging transaction
[Jun  7 17:47:58.324] Server {48011850979072} DEBUG: (http) [2] dellocating
sm
----------------------------------------------------------------------------
-----------------------------------

if I was wrong let me know how I can make a plugin specific to a domain. 

Thanks and regards. 

Reply via email to