scylla main.cc

main:
– cpu sse4.2 flag check
– init the uptime timer
– app template/config/options
– query_processor
– get storage_proxy
– get migration_manager
– http_context ctx (create)
– prometheus
– app.run_deprecated()
– parse args
– tcp_syncookies check
– seastar::async()
– dma read cfg
– apply logging settings
– verify rlimit(openfile)
– mem_per_shard 2 ** 32 ~= 1G
– check partitioner, Murmur3Partitioner is recommended
– cfg: assign setup parameters
– start prometheus API server
– set broadcast/broadcast_rpc
– client encryption
– create trace/snitch
– dns/api_address
– start API server(ctx.http_server)
– init storage service
– init per-shard core
– start engine
– init data dir
– init commitlog dir
– * init system keyspace
– * start gossip by init_ms_fd_gossiper()
– * start storage proxy
– start migration manager
– start query processor
– init batchlog manager
– init metrics?
– mini setup (sys ks)
– legacy schema migrate
– loading sstables
– setup sys ks
– start commitlog
– set storage/gossip/snitch/storage_proxy/load_sstable server to ctx
– init migration manager rpc verbs
– init storage proxy rpc verbs
– * start streaming service
– starting msg service
– start storage service
– start load broadcaster
– start cf/cache hit rate
– start native transport ( start (thrift) rpc)
– * set_server_done
– at_exit():
– repair_shutdown
– drain_on_shutdown
– compaction_manager stop

Key components
– storage proxy
– migration manager
– partitioner
– prometheus API server
– engine
– query processor
– streaming service
– thrift rpc
– compaction manager