1

I am planning to implement audit trail of my incoming HTTP request .

I was thinking of having some kind of gateway which will redirect every incoming call to 2 server i.e. one is where actual logic written and second will be pass each incoming request to log server application which basically log all api request.I just wanted to know the best way in terms of performance to achieve this requirement. I am ok if we can do with nginx as well.

1 Answers1

0

It's not clear if you need to have a second server/application because the process of logging this stuff is especially complex for you, or if you're just offering that as an example solution to the basic problem of logging stuff.

If you just meant it as an example, then it's probably overkill. Nginx's logging is configurable; getting it to serve your needs would be my first suggestion.

If your needs are more complex, then you'll have to explain them in more detail. You may also find that your question is more on-topic for Software Engineering (for advice about how to structure a custom solution) or Software Recommendations (for suggestions about existing solutions).

ShapeOfMatter
  • 991
  • 6
  • 25
  • Basically my requirement is to log all api hit in any of the system.Lets suppose we have 3 different application of java and i have to just log every input request to these application.So i was thinking of creating a separate application for logging which will get called on each request to 3 different applications.This can be achieved via API gateway which will call log app and required app for that request or there is better way to achieve it.I just want my original API performance will not hit in any case. – Sudhanshu Agarwal Sep 25 '19 at 16:31
  • Are all the API hits passing through nginx? because nginx can definitely log all incoming requests. If you're using a cloud "API gateway" it may also come with logging tools available. – ShapeOfMatter Sep 25 '19 at 16:34
  • Yes all api are passing through nginx only.I do not have gateway implemented but if required we can implement that.But i want best performance – Sudhanshu Agarwal Sep 26 '19 at 13:37