Logstash has fail safe?

My current setup is the data is from beats(filebeat and winlogbeat) then to logstash for mapping then to elasticsearch.
What will happen if elasticsearch is down?
Does the data will still be in queue?

Depends on your configuration; Logstash has internal queues, but they can be fine-tuned to suit your use case.

See this article, it may be useful to understand the underlying architecture: https://www.elastic.co/guide/en/logstash/current/deploying-and-scaling.html

Will check this out. Thanks!