# Elastic stack for Node & Angular

**URL:** <https://discuss.elastic.co/t/elastic-stack-for-node-angular/228452>\
**Category:** Elasticsearch\
**Created:** [April 17, 2020, 5:12am UTC](https://discuss.elastic.co/t/elastic-stack-for-node-angular/228452 "2020-04-17T05:12:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bhagyashree\_S.B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhagyashree_s.b/32/66489_2.png) [@Bhagyashree\_S.B](https://discuss.elastic.co/u/Bhagyashree_S.B)\
**Post date:** [April 17, 2020, 5:12am UTC](https://discuss.elastic.co/t/elastic-stack-for-node-angular/228452/1 "2020-04-17T05:12:47Z")

</div>

Hi,

We have recently started to setup centralized logging for our projects using Elastic stack. The projects are built with Angular as the frontend framework & NodeJS as the middleware. Please suggest on how to send the application logs, from both Angular & NodeJS layer, to elasticsearch.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 17, 2020, 5:44am UTC](https://discuss.elastic.co/t/elastic-stack-for-node-angular/228452/2 "2020-04-17T05:44:51Z")

</div>

Your options are;

- Log to a file and then use Filebeat to send it to Elasticsearch
- Send it to something like a message broker/queue (kafka etc)
- Send it to Elasticsearch directly

I'd say that the first one makes the most sense, as the file will act as a buffer, in case Filebeat cannot talk to Elasticsearch, and as a backup in case you want to reprocess.

---

<div class="post-metadata">

**Author:** ![Bhagyashree\_S.B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhagyashree_s.b/32/66489_2.png) [@Bhagyashree\_S.B](https://discuss.elastic.co/u/Bhagyashree_S.B)\
**Post date:** [April 17, 2020, 7:00am UTC](https://discuss.elastic.co/t/elastic-stack-for-node-angular/228452/3 "2020-04-17T07:00:41Z")

</div>

Thank you for the response.

With regard to approach 3 i.e. sending the log directly to elastic - is there any impact on the elastic search performance due to continuous API POST requests?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 17, 2020, 8:33am UTC](https://discuss.elastic.co/t/elastic-stack-for-node-angular/228452/4 "2020-04-17T08:33:52Z")

</div>

I would recommend writing to file as this prevents issues in the application if Elasticsearch is temporarily unavailable for any reason.

---

<div class="post-metadata">

**Author:** ![Bhagyashree\_S.B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhagyashree_s.b/32/66489_2.png) [@Bhagyashree\_S.B](https://discuss.elastic.co/u/Bhagyashree_S.B)\
**Post date:** [April 19, 2020, 11:08pm UTC](https://discuss.elastic.co/t/elastic-stack-for-node-angular/228452/5 "2020-04-19T23:08:23Z")

</div>

Sure thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 17, 2020, 11:08pm UTC](https://discuss.elastic.co/t/elastic-stack-for-node-angular/228452/6 "2020-05-17T23:08:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
