Can we consider the fix of issue something like below :-
1. check if service is up using difference of timestamps
2. if True, return True
3. Else fetch latest updated_at/created_at from db again and check for difference of timestamps
4. return value from step 3.
Reading additionally once(from db) for service which are not up as per step 1, would be good tradeoff I believe. Basically its live check for service if it fails to report as 'up'.
Can we consider the fix of issue something like below :- at/created_ at from db again and check for difference of timestamps
1. check if service is up using difference of timestamps
2. if True, return True
3. Else fetch latest updated_
4. return value from step 3.
Reading additionally once(from db) for service which are not up as per step 1, would be good tradeoff I believe. Basically its live check for service if it fails to report as 'up'.