Giter Site home page Giter Site logo

karafka / karafka-web Goto Github PK

View Code? Open in Web Editor NEW
45.0 5.0 7.0 1.01 MB

Web UI for monitoring and managing Karafka consumers

License: Other

Ruby 81.17% JavaScript 2.28% CSS 0.17% HTML 16.36% Shell 0.02%
kafka-consumer kafka-manager kafka-monitor kafka-monitoring kafka-monitoring-dashboards kafka-producer kafka-ui karafka karafka-framework rails

karafka-web's Introduction

karafka logo

Build Status Gem Version Join the chat at https://slack.karafka.io

About Karafka

Karafka is a Ruby and Rails multi-threaded efficient Kafka processing framework that:

# Define what topics you want to consume with which consumers in karafka.rb
Karafka::App.routes.draw do
  topic 'system_events' do
    consumer EventsConsumer
  end
end

# And create your consumers, within which your messages will be processed
class EventsConsumer < ApplicationConsumer
  # Example that utilizes ActiveRecord#insert_all and Karafka batch processing
  def consume
    # Store all of the incoming Kafka events locally in an efficient way
    Event.insert_all messages.payloads
  end
end

Karafka uses threads to handle many messages simultaneously in the same process. It does not require Rails but will integrate tightly with any Ruby on Rails applications to make event processing dead simple.

Getting started

karafka web ui

If you're entirely new to the subject, you can start with our "Kafka on Rails" articles series, which will get you up and running with the terminology and basic ideas behind using Kafka:

If you want to get started with Kafka and Karafka as fast as possible, then the best idea is to visit our Getting started guides and the example apps repository.

We also maintain many integration specs illustrating various use-cases and features of the framework.

TL;DR (1 minute from setup to publishing and consuming messages)

Prerequisites: Kafka running. You can start it by following instructions from here.

  1. Add and install Karafka:
# Make sure to install Karafka 2.4
bundle add karafka --version ">= 2.4.0"

bundle exec karafka install
  1. Dispatch a message to the example topic using the Rails or Ruby console:
Karafka.producer.produce_sync(topic: 'example', payload: { 'ping' => 'pong' }.to_json)
  1. Run Karafka server and see the consumption magic happen:
bundle exec karafka server

[86d47f0b92f7] Polled 1 message in 1000ms
[3732873c8a74] Consume job for ExampleConsumer on example started
{"ping"=>"pong"}
[3732873c8a74] Consume job for ExampleConsumer on example finished in 0ms

Want to Upgrade? LGPL is not for you? Want to help?

I also sell Karafka Pro subscriptions. It includes a commercial-friendly license, priority support, architecture consultations, enhanced Web UI and high throughput data processing-related features (virtual partitions, long-running jobs, and more).

10% of the income will be distributed back to other OSS projects that Karafka uses under the hood.

Help me provide high-quality open-source software. Please see the Karafka homepage for more details.

Support

Karafka has Wiki pages for almost everything and a pretty decent FAQ. It covers the installation, setup, and deployment, along with other useful details on how to run Karafka.

If you have questions about using Karafka, feel free to join our Slack channel.

Karafka has priority support for technical and architectural questions that is part of the Karafka Pro subscription.

karafka-web's People

Contributors

mensfeld avatar nijikon avatar pat avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

karafka-web's Issues

Extensive data-poll on processes despite no processes being available

When materializing processes states and not having any processes to operate on, we despite that pull 10k of messages and deserialize them for nothing because they are going to be rejected in the next step. This and the fact that we get 10k from -1 means, we load a lot of data for nothing.

CSS Content Display: None?

Expected behavior

The Web UI to be viewable?

Actual behavior

The css states #content { display: none; }. The only thing that gets displayed is the banner to subscribe to karafka pro.

https://github.com/karafka/karafka-web/blob/master/lib/karafka/web/ui/public/stylesheets/application.css#L7

Steps to reproduce the problem

Install Web, Attempt to view UI

Your setup details

Karafka version: 2.0.39
Ruby version: ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [arm64-darwin22]
Rdkafka version: 0.12.1
Consumer groups count: 3
Subscription groups count: 3
Workers count: 5
Application client id: next
Boot file: ./config/karafka.rb
Environment: development
License: LGPL-3.0

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

bundler
Gemfile
  • byebug undefined
  • factory_bot undefined
  • rack-test undefined
  • rspec undefined
  • simplecov undefined
docker-compose
docker-compose.yml
  • confluentinc/cp-kafka 7.6.1
github-actions
.github/workflows/ci.yml
  • actions/checkout v4
  • ruby/setup-ruby v1
  • actions/checkout v4
  • ruby/setup-ruby v1
  • actions/checkout v4
ruby-version
.ruby-version
  • ruby 3.3.1

  • Check this box to trigger a request for Renovate to run again on this repository

Mask SASL credentials in topic routing view

Is your feature request related to a problem? Please describe.

When inspecting routing details for a topic, the view exposes all SASL credentials. The end user should be responsible for putting the web ui ideally behind a VPN & 2FA Auth. However, even then having cluster credentials exposed in plain-text isn't ideal if they're not serving a purpose.

Describe the solution you'd like

  1. The _details partial of a topic's show page additionally filters for 'sasl'
        <% if k2.to_s.include?('ssl') || k2.to_s.include?('sasl')  %>
          ***
        <% else %>
          <%= v2 %>
        <% end %>

Describe alternatives you've considered

This seemed like the simplest approach for now unless there are plans for configurable masking settings:

  1. Configurable regex or keys to match for topic routing show details
  2. Configurable regex or keys to match for topic explore details. e.g. Deeply scan a topic payload in the show tab to exclude values that contain PII (e.g. email, address => '***')

I can turn the above into a separate feature request (topic payload masking)

Additional context

Screen Shot 2023-04-04 at 11 13 16 AM

Providing alternative pagination mode in the explorer via times

Current pagination mode has benefit of "life refresh" where when using live view we can see the data flow on a page. This can be both good and bad.

We should provide an alternative mode, where instead of moving via pages computed from the watermark offsets we use the timestamp and use watermarks as a constant distance.

One should not replace the other but they should complement each other with pagination (old) being the default.

Expand status page with topics reading/access attempts

Status could not only verify connectivity but could also check if web UI topics are accessible (readable) and writeable from the given user. At least states and reports (we don't want to pollute errors).

This should highlight problems with ACL

Consider providing per-topic aggregated health view

Currently we always show per partition. This is detailed but is also not "fast" in terms of giving a general understanding of the processing realm.

It would be good if we could have a per CG topic view with partitions aggregated data that can be used to quickly check if all good or something is stopped.

Since we have freeze duration for LSO and friends, this can be done easily.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.