You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since we have to evict client accounting data after 'some time', it has sense to store them in a TDB table. At this time TDB has issues with eviction - just let's leave with them untill they are fixed in Beta.
Next, the hash key for searching a client must be calculated by User-Agent plus IP address, otherwise, if no User-Agent, only IP address.
Currently, we use netowork IP address as the address of a client, however if a client work through a forward proxy, then a proxy can pass it's IP address by the first item in X-Forwarded-For, so if the header is present, then we shall reinsert the TfwClient in TDB with different key.
The reinsert operation must be implemented on TDB layer as a new routine tdb_entry_reinsert() accepting current and new keys. The function must call tdb_htrie_insert(), copying the data from the previous location, and a new empty tdb_htrie_delete() left as TODO for #515.
Traversal all the clients on shutdown must be done by a new TDB routine tdb_walk() which is just a walk on the radix tree plus tdb_rec_next() call. The routine must expect that there is no tree writers (the operation must be done after closing the listener socket and sycnrhonization barrier on all softirqs).
The text was updated successfully, but these errors were encountered:
The task is from #488 (comment):
From #100: the most urgent thing is to keep security accounting data for a client for some time after the last client connection is closed. This is very important to track client security limits properly for
Connection: closed
connections. See https://github.com/tempesta-tech/tempesta/blob/master/tempesta_fw/client.c#L89Since we have to evict client accounting data after 'some time', it has sense to store them in a TDB table. At this time TDB has issues with eviction - just let's leave with them untill they are fixed in Beta.
Next, the hash key for searching a client must be calculated by User-Agent plus IP address, otherwise, if no User-Agent, only IP address.
Currently, we use netowork IP address as the address of a client, however if a client work through a forward proxy, then a proxy can pass it's IP address by the first item in
X-Forwarded-For
, so if the header is present, then we shall reinsert theTfwClient
in TDB with different key.The reinsert operation must be implemented on TDB layer as a new routine
tdb_entry_reinsert()
accepting current and new keys. The function must calltdb_htrie_insert()
, copying the data from the previous location, and a new emptytdb_htrie_delete()
left as TODO for #515.Traversal all the clients on shutdown must be done by a new TDB routine
tdb_walk()
which is just a walk on the radix tree plustdb_rec_next()
call. The routine must expect that there is no tree writers (the operation must be done after closing the listener socket and sycnrhonization barrier on all softirqs).The text was updated successfully, but these errors were encountered: