Need Guidance: Setting Up Elasticsearch Cluster and Integrating with Spring Boot Application

Hi everyone,

I'm a DevOps intern, and my team is planning to integrate Elasticsearch with our application (built using Spring Boot). I've been tasked with setting up an Elasticsearch cluster and configuring it for the integration.

Since this is my first time working with Elasticsearch, I could really use your help to understand:

  1. Setting up an Elasticsearch Cluster:
    • What are the steps to set up a basic Elasticsearch cluster (single-node or multi-node)?
  • Are there any best practices or configurations I should be aware of for production readiness?
  1. Configuration and Access Control:
    • What configurations should I prioritize (e.g., memory settings, cluster settings, security settings like TLS, etc.)?
  • How can I secure the cluster to ensure only the Spring Boot application has access to it?
  1. Integration with Spring Boot:
    • What endpoint(s) should I provide to the development team for integrating Elasticsearch with Spring Boot?
  • Are there any additional steps I should communicate to the dev team for a smooth integration?

I appreciate any guidance, resources, or examples you can share to help me get started.

Thank you in advance for your help!

Hey

I'd use docker compose or just docker depending on what you want to do.

What are the steps to set up a basic Elasticsearch cluster (single-node or multi-node)?

See Install Elasticsearch with Docker | Elasticsearch Guide [8.17] | Elastic

Are there any best practices or configurations I should be aware of for production readiness?

I'd start from here: Important system configuration | Elasticsearch Guide [8.17] | Elastic

How can I secure the cluster to ensure only the Spring Boot application has access to it?

The default docker compose example has TLS, security...

What endpoint(s) should I provide to the development team for integrating Elasticsearch with Spring Boot?

Something like https://localhost:9200.

Some useful resources:

HTH

@dadoonet I want to deploy the elasticsearch as multinode in production
I think it is not good to deploy it as docker compose for production
so can give steps to set up cluster for production
also for multi node what should endpoint should I give to dev (since there is multi node)

The easiest way to be up and running is to use cloud.elastic.co with 2 options:

  • Serverless: we do everything and you just send data
  • Elasticsearch service: you define what type of architecture you want, like hot, warm, cold nodes...

If you want to run everything within your own datacenter, you can read important information from this page: Get ready for production | Elasticsearch Guide [8.17] | Elastic

1 Like