33
Be water with Apache Spark™ in the Real World

Be watter with Spark

Embed Size (px)

Citation preview

Page 1: Be watter with Spark

Be water with

Apache Spark™ in the Real World

Page 2: Be watter with Spark

¡Hola!

• Sergio Gómez

• Software Architect at

• @pulsarin

• linkedin.com/in/bedeveloper

Page 3: Be watter with Spark

Contenido

• Un proyecto Big Data

• Lecciones aprendidas

• Búsqueda de rendimiento

Page 4: Be watter with Spark

¿De qué va esto?

Page 5: Be watter with Spark

¿De qué va esto?

Page 6: Be watter with Spark

Un proyecto

Page 7: Be watter with Spark

Un proyecto

• Telco internacional

• Información de la sondas

• 10 millones de usuarios registrados

Page 8: Be watter with Spark

Volumen

• ~10K millones de eventos diarios

• 17 nodos, 360 cores, 2’4 TB ram

• Ejecuciones diarias

Page 9: Be watter with Spark

Volumen

Page 10: Be watter with Spark

Objetivos

• Monetización

• Calidad de las infraestructuras

• Detección de potenciales problemas

Page 11: Be watter with Spark

Lecciones aprendidas

Page 12: Be watter with Spark

Diseña

• Piensa en los datos

• Piensa en el flujo

• Piensa en tu storage

Page 13: Be watter with Spark

Caso 1: ETL

• Descarga diaria de las sondas

• Procesado y enriquecido con los usuarios

• Guardado para futuros procesos

• Métricas de sanidad

Page 14: Be watter with Spark

Caso 1: ETL

• Gran volumen de datos

• Errores de parseo

• Reprocesing

Page 15: Be watter with Spark

Caso 1: ETL

CPU

RAMRED

Page 16: Be watter with Spark

Caso II: K-Means

• Muchas iteraciones

• Ensayo - error

• Datos precocinados

Page 17: Be watter with Spark

Los errores

Page 18: Be watter with Spark

Los errores

Page 19: Be watter with Spark

No falles

• Tu aplicación no puede fallar

• Un error puede suponer horas…

• … o incluso perder información

Page 20: Be watter with Spark

Datos reales

• Usa samples reales

• Reduce la magnitud para extrapolar

Page 21: Be watter with Spark

“Qué sea barato fallar”

Page 22: Be watter with Spark

Volumen real

• Usa el volumen real

• Necesitas ser escalable

Page 23: Be watter with Spark

Evitaremos

• PermGen

• OOM

• Tiempos de proceso demasiado altos

• No escalamos

• Uso asimétrico del cluster

Page 24: Be watter with Spark

“Falla rápido”

Page 25: Be watter with Spark

Buscando rendimiento

Page 26: Be watter with Spark

Cachea

• Cachea cuando sea posible

• Usa broadcast

• Coalesce

Page 27: Be watter with Spark

Gestiona el cluster

• Mesos / YARN

• Prueba diferentes configuraciones

• JVM tuning

Page 28: Be watter with Spark

Suffle

• Piensa en la distribución de keys

• Partitioner

• ¿Qué voy a hacer con los datos?

• groupByKey

Page 29: Be watter with Spark

SparkSQL

• Select * from… ¿seriously?

• Bueno si tenemos datos parcialmente estructurados

• Trabajar con un subset

Page 30: Be watter with Spark

¿Dudas?

Page 31: Be watter with Spark
Page 32: Be watter with Spark

Linkazos :)

• http://es.slideshare.net/pulsarin/be-watter-with-spark

• http://kcy.me/29czy

• Insultos aquí: http://kcy.me/29d01

Page 33: Be watter with Spark

¡Gracias!@pulsarin